ThomasDelteil commented on issue #11089: The module.update_metric may hurt the 
performance in some cases.
URL: 
https://github.com/apache/incubator-mxnet/issues/11089#issuecomment-392953927
 
 
   Have a look at this issue for this problem, 
https://github.com/apache/incubator-mxnet/issues/9571
   
   If you use Gluon, you can compute easily your metric directly on GPU and 
indeed you can get a lot of performance gain.
   
   However be careful on your evaluation, if you remove all the blocking calls 
(asnumpy(), metric calculation, loss printing, etc) you could have the false 
impression that your training is completed whilst it is actually running in the 
background. So before completing your timing experiment, add a 
`mx.nd.waitall()` to force wait for all the asynchronous operation to complete.
   
   check an example GPU metric implementation here: 
https://discuss.mxnet.io/t/improve-the-speed-of-evaluating-the-metric/886/2

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to