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/05/29 14:01:28 UTC

[GitHub] huyangc opened a new issue #11089: The module.update_metric may hurt the performance in some cases.

huyangc opened a new issue #11089: The module.update_metric may hurt the performance in some cases.
URL: https://github.com/apache/incubator-mxnet/issues/11089
 
 
   I found that the input of the metric instance(preds and labels) might be in different context, the preds will always in ``cpu``. So that when I train a network that have about 100 k classes, the output of the mod will be copied to cpu to calculate the cross entropy loss. The copy procedure will hurt the performance. For example, when I train a resnet-18 with 100k classes:
   Speed with CrossEntropy: ~200 fps
   Speed without Cross Entropy: ~2000 fps
   
   Why when update metric, just calculate the result in the gpu context and get the final result and then copy to cpu for showing?

----------------------------------------------------------------
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