You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/07/29 07:45:01 UTC

[GitHub] [incubator-mxnet] sxjscience commented on a change in pull request #17196: [NumPy] loss for np array

sxjscience commented on a change in pull request #17196:
URL: https://github.com/apache/incubator-mxnet/pull/17196#discussion_r461310396



##########
File path: python/mxnet/gluon/loss.py
##########
@@ -74,6 +74,26 @@ def _reshape_like(F, x, y):
     return F.reshape_like(x, y)
 
 
+def _batch_mean(F, loss, batch_axis):
+    """Return mean on the specified batch axis, not keeping the axis"""
+    if is_np_array():
+        axes = list(range(loss.ndim))

Review comment:
       Would this work for the hybridized case?




----------------------------------------------------------------
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:
users@infra.apache.org