abhinavs95 commented on a change in pull request #14442: [MXNet-1349][WIP][Fit 
API]Add validation support and unit tests for fit() API
URL: https://github.com/apache/incubator-mxnet/pull/14442#discussion_r266688958
 
 

 ##########
 File path: python/mxnet/gluon/estimator/estimator.py
 ##########
 @@ -253,8 +294,14 @@ def fit(self, train_data,
                 for handler in event_handlers:
                     handler.batch_end()
 
-            for metric in self.metrics + self.loss_metrics:
+            if do_validation:
+                self._evaluate(val_data, batch_fn)
+
+            for metric in self.train_metrics + self.train_loss_metrics:
                 self.train_stats['train_' + 
metric.name].append(metric.get()[1])
+            for metric in self.test_metrics + self.test_loss_metrics:
 
 Review comment:
   we can use `test_metrics` for both validation (at epoch end) and test (at 
train end) dataset

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to