-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix image-classification import error with python3 #4681
Conversation
1c58591
to
c099238
Compare
@@ -86,7 +86,7 @@ def validate(self, attrs): | |||
sys.exit(1) | |||
try: | |||
#check if the network exists | |||
importlib.import_module('symbol.'+ args[0]) | |||
importlib.import_module('symbols.'+ args[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why rename to symbols?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because conflict with mx.symbol
in python3 can't loading.
@@ -12,13 +12,13 @@ def get_symbol(num_classes, **kwargs): | |||
data=input_data, kernel=(11, 11), stride=(4, 4), num_filter=96) | |||
relu1 = mx.symbol.Activation(data=conv1, act_type="relu") | |||
pool1 = mx.symbol.Pooling( | |||
data=relu1, pool_type="max", kernel=(3, 3), stride=(2,2)) | |||
data=relu1, pool_type="max", kernel=(3, 3), stride=(2,2), pad=(1, 1)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this breaks backward compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes.the pool1 no problem. no need for pad.
do other pool pad lead to compatibility issues?
c155f98
to
0eb840a
Compare
fix alexnet and googlenet pooling pad error remove first pool pad. remove pad
0eb840a
to
4c628ee
Compare
* fix import error with python3 fix alexnet and googlenet pooling pad error remove first pool pad. remove pad * Update alexnet.py
alexnet and googlenet are wrongly switched #4826 |
fix import error with python3