You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/10/03 21:30:20 UTC

[GitHub] mli commented on issue #7995: Problem in acc metric

mli commented on issue #7995: Problem in acc metric
URL: https://github.com/apache/incubator-mxnet/pull/7995#issuecomment-333984572
 
 
   can we just use ndarray to compute instead of converting to numpy? if there is a number of classes, say 10K, then it could be problematic
   
   a sample code:
   
   ```
   def accuracy(output, label):
       # both output and label are ndarray
       return (output.argmax(axis=1)==label).sum().asscalar()
   ```
 
----------------------------------------------------------------
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