piiswrong commented on a change in pull request #9305: Fixing two symbol files 
for CNN
URL: https://github.com/apache/incubator-mxnet/pull/9305#discussion_r159959891
 
 

 ##########
 File path: example/image-classification/symbols/vgg.py
 ##########
 @@ -62,8 +62,12 @@ 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):
-        raise ValueError("Invalide num_layers {}. Possible choices are 
11,13,16,19.".format(num_layers))
+    if sys.version_info > (3,):
+        if not num_layers in vgg_spec:
 
 Review comment:
   yes. but `if num_layers not in vgg_spec` works for both py2 and 3

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to