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/04/06 22:01:14 UTC

[GitHub] indhub commented on a change in pull request #10437: [MXNET-171] Fix a bug that was causing training accuracy to be printed as nan sometimes

indhub commented on a change in pull request #10437: [MXNET-171] Fix a bug that was causing training accuracy to be printed as nan sometimes
URL: https://github.com/apache/incubator-mxnet/pull/10437#discussion_r179886054
 
 

 ##########
 File path: python/mxnet/module/base_module.py
 ##########
 @@ -523,8 +524,9 @@ def fit(self, train_data, eval_data=None, eval_metric='acc',
                     monitor.toc_print()
 
                 if batch_end_callback is not None:
+                    arg_eval_metric = eval_metric if not end_of_batch else deepcopy(eval_metric)
 
 Review comment:
   Deep copy happens maximum once a epoch. That adds negligible time to an epoch.
   
   Hacky - yes. That's because we are trying to print metrics outside the loop which could get cleared inside the loop. Any solution that doesn't modify the existing behavior will be a little hacky.

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