Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Fix undefined_variable lint errors in examples (#12052)
Browse files Browse the repository at this point in the history
* Fix lint errors in dqn example

* Fix lint error in gluon example

* Fix undefined error in autoencoder example
  • Loading branch information
vandanavk authored and sandeep-krishnamurthy committed Aug 8, 2018
1 parent edc28af commit 5293336
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion example/autoencoder/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import numpy as np
try:
import cPickle as pickle
except ModuleNotFoundError:
except ImportError:
import pickle


Expand Down
3 changes: 2 additions & 1 deletion example/gluon/image_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
from mxnet.metric import Accuracy, TopKAccuracy, CompositeEvalMetric
import numpy as np

from data import *
from data import (get_cifar10_iterator, get_imagenet_iterator,
get_caltech101_iterator, dummy_iterator)

# logging
logging.basicConfig(level=logging.INFO)
Expand Down
2 changes: 1 addition & 1 deletion example/reinforcement-learning/dqn/atari_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import cv2
import logging
import os
from utils import *
from utils import get_numpy_rng
from replay_memory import ReplayMemory
from game import Game
from game import DEFAULT_MAX_EPISODE_STEP
Expand Down
3 changes: 2 additions & 1 deletion example/reinforcement-learning/dqn/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
import os
import pickle
from collections import OrderedDict
from utils import (get_bucket_key, save_params,
save_misc, load_params)
import logging
from utils import *

logger = logging.getLogger(__name__)

Expand Down
4 changes: 3 additions & 1 deletion example/reinforcement-learning/dqn/dqn_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
from base import Base
from operators import *
from atari_game import AtariGame
from utils import *
from utils import get_numpy_rng, parse_ctx
import logging
import argparse
import sys
import time

root = logging.getLogger()
root.setLevel(logging.DEBUG)
Expand Down
2 changes: 1 addition & 1 deletion example/reinforcement-learning/dqn/dqn_run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import sys
from base import Base
from atari_game import AtariGame
from utils import *
from utils import get_numpy_rng
from operators import *

root = logging.getLogger()
Expand Down
2 changes: 1 addition & 1 deletion example/reinforcement-learning/dqn/replay_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import mxnet.ndarray as nd
import numpy
import copy
from utils import *
from utils import get_numpy_rng


class ReplayMemory(object):
Expand Down

0 comments on commit 5293336

Please sign in to comment.