roywei 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_r350488360
##########
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:
you don't need to add `gradient_update` here right? as it's added as a
default handler?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services