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 2018/03/01 00:13:00 UTC

[GitHub] hetong007 commented on a change in pull request #9930: Support single array input for metric

hetong007 commented on a change in pull request #9930: Support single array input for metric
URL: https://github.com/apache/incubator-mxnet/pull/9930#discussion_r171428505
 
 

 ##########
 File path: python/mxnet/metric.py
 ##########
 @@ -793,6 +793,8 @@ def update(self, labels, preds):
 
             if len(label.shape) == 1:
                 label = label.reshape(label.shape[0], 1)
+            if len(pred.shape) == 1:
+                pred = pred.reshape(pred.shape[0], 1)
 
 
 Review comment:
   Is there a reason to set `shape=0` by default?

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


With regards,
Apache Git Services