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/08/15 16:23:34 UTC
[GitHub] sandeep-krishnamurthy closed pull request #12164: Removed fixed
seed for test_nadam.
sandeep-krishnamurthy closed pull request #12164: Removed fixed seed for test_nadam.
URL: https://github.com/apache/incubator-mxnet/pull/12164
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/tests/python/unittest/test_optimizer.py b/tests/python/unittest/test_optimizer.py
index bdd71eef81a..449cdb42346 100644
--- a/tests/python/unittest/test_optimizer.py
+++ b/tests/python/unittest/test_optimizer.py
@@ -943,7 +943,7 @@ def test_ftrl():
compare_optimizer(opt1(lazy_update=True, **kwarg), opt2(**kwarg), shape,
np.float32, w_stype='row_sparse', g_stype='row_sparse')
-@with_seed(1234)
+@with_seed()
def test_nadam():
def get_net(num_hidden, flatten=True):
@@ -965,10 +965,10 @@ def get_net(num_hidden, flatten=True):
loss = Loss(output, l)
loss = mx.sym.make_loss(loss)
mod = mx.mod.Module(loss, data_names=('data',), label_names=('label',))
- mod.fit(data_iter, num_epoch=60, optimizer_params={'learning_rate': 0.0005, 'wd': 0.0005},
+ mod.fit(data_iter, num_epoch=60, optimizer_params={'learning_rate': 0.001, 'wd': 0.0005},
initializer=mx.init.Xavier(magnitude=2), eval_metric=mx.metric.Loss(),
optimizer='nadam')
- assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.1
+ assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.11
# AdaGrad
class PyAdaGrad(mx.optimizer.Optimizer):
----------------------------------------------------------------
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