liuzh91 commented on a change in pull request #16900: introduce  gradient 
update handler to the  base estimator
URL: https://github.com/apache/incubator-mxnet/pull/16900#discussion_r350519861
 
 

 ##########
 File path: tests/python/unittest/test_gluon_estimator.py
 ##########
 @@ -332,39 +332,41 @@ def test_default_handlers():
     train_acc = mx.metric.RMSE()
     loss = gluon.loss.L2Loss()
 
+    gradient_update = GradientUpdateHandler()
     est = Estimator(net=net,
                     loss=loss,
                     metrics=train_acc,
                     trainer=trainer,
                     context=ctx)
-    # no handler(all default handlers), no warning
+    # no handler except gradient update handler (all default handlers), no 
warning
     with warnings.catch_warnings(record=True) as w:
-        est.fit(train_data=train_data, epochs=num_epochs)
+        est.fit(train_data=train_data, epochs=num_epochs, 
event_handlers=[gradient_update])
 
 Review comment:
   My mistake. I'll remove this handler here.

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