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

fix image-classification import error with python3 #4681

Merged
merged 2 commits into from
Jan 21, 2017

Conversation

yajiedesign
Copy link
Contributor

@yajiedesign yajiedesign commented Jan 16, 2017

fix import error with python3

@yajiedesign yajiedesign changed the title fix import error with python3 fix image-classification import error with python3 Jan 16, 2017
@@ -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])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why rename to symbols?

Copy link
Contributor Author

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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this breaks backward compatibility.

Copy link
Contributor Author

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?

fix alexnet and googlenet pooling pad error
remove first pool pad.
remove pad
@piiswrong piiswrong merged commit c141542 into apache:master Jan 21, 2017
rravu3 pushed a commit to rravu3/mxnet that referenced this pull request Jan 21, 2017
* fix import error with python3
fix alexnet and googlenet pooling pad error
remove first pool pad.
remove pad

* Update alexnet.py
@mli
Copy link
Contributor

mli commented Jan 30, 2017

alexnet and googlenet are wrongly switched #4826

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants