szha closed pull request #9524: example/image-classification work with python3 URL: https://github.com/apache/incubator-mxnet/pull/9524
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/example/image-classification/symbols/vgg.py b/example/image-classification/symbols/vgg.py index 8ae48a0a28..e715ff6edc 100644 --- a/example/image-classification/symbols/vgg.py +++ b/example/image-classification/symbols/vgg.py @@ -62,7 +62,7 @@ def get_symbol(num_classes, num_layers=11, batch_norm=False, dtype='float32', ** 13: ([2, 2, 2, 2, 2], [64, 128, 256, 512, 512]), 16: ([2, 2, 3, 3, 3], [64, 128, 256, 512, 512]), 19: ([2, 2, 4, 4, 4], [64, 128, 256, 512, 512])} - if not vgg_spec.has_key(num_layers): + if num_layers not in vgg_spec: raise ValueError("Invalide num_layers {}. Possible choices are 11,13,16,19.".format(num_layers)) layers, filters = vgg_spec[num_layers] data = mx.sym.Variable(name="data") ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services