apeforest commented on a change in pull request #17652: Use multi-tensor sumSQ 
in clip_global_norm
URL: https://github.com/apache/incubator-mxnet/pull/17652#discussion_r382666025
 
 

 ##########
 File path: python/mxnet/gluon/utils.py
 ##########
 @@ -145,12 +143,12 @@ def group_by_ctx(arr_list):
     all_ctx_sum = []
     ctx = arrays[0].context
     for group in arrays_groups:
-        sum_sq = mx.nd.multi_sum_sq(*arrays_groups[group],
-                                    num_arrays=len(arrays_groups[group]))
-        sum_sq = nd.add_n(*sum_sq)
+        sum_sq = ndarray.multi_sum_sq(*arrays_groups[group],
 
 Review comment:
   What’s the difference between mxnet.ndarray and ndarray here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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