piiswrong commented on a change in pull request #7568: modify parameters 
counting of FC and CONV
URL: https://github.com/apache/incubator-mxnet/pull/7568#discussion_r134647714
 
 

 ##########
 File path: python/mxnet/visualization.py
 ##########
 @@ -134,12 +134,20 @@ def print_layer_summary(node, out_shape):
                             pre_filter = pre_filter + int(shape[0])
         cur_param = 0
         if op == 'Convolution':
-            cur_param = pre_filter * int(node["attr"]["num_filter"])
-            for k in _str2tuple(node["attr"]["kernel"]):
-                cur_param *= int(k)
-            cur_param += int(node["attr"]["num_filter"])
+            if node["attr"].has_key("no_bias") and node["attr"]["no_bias"] == 
'True':
 
 Review comment:
   use xx in yy instead of has_key for python2/3 compatibility
 
----------------------------------------------------------------
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

Reply via email to