You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ha...@apache.org on 2018/06/28 20:46:44 UTC
[incubator-mxnet] branch master updated: lower learning rate
(#11467)
This is an automated email from the ASF dual-hosted git repository.
haibin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new a7d858d lower learning rate (#11467)
a7d858d is described below
commit a7d858db95dbb6f595d22a2cab87644bb81f5f12
Author: Alexander Zai <az...@gmail.com>
AuthorDate: Thu Jun 28 13:46:34 2018 -0700
lower learning rate (#11467)
---
tests/python/unittest/test_loss.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/python/unittest/test_loss.py b/tests/python/unittest/test_loss.py
index 14c4f6b..8d5b863 100644
--- a/tests/python/unittest/test_loss.py
+++ b/tests/python/unittest/test_loss.py
@@ -180,8 +180,7 @@ def test_l1_loss():
assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.1
-@unittest.skip("flaky test. https://github.com/apache/incubator-mxnet/issues/8892")
-@with_seed()
+@with_seed(1234)
def test_ctc_loss():
loss = gluon.loss.CTCLoss()
l = loss(mx.nd.ones((2,20,4)), mx.nd.array([[1,0,-1,-1],[2,1,1,-1]]))
@@ -207,7 +206,7 @@ def test_ctc_loss():
l = loss(mx.nd.ones((2,25,4)), mx.nd.array([[2,1,3,3],[3,2,2,3]]), mx.nd.array([20,20]), mx.nd.array([2,3]))
mx.test_utils.assert_almost_equal(l.asnumpy(), np.array([18.82820702, 16.50581741]))
-@unittest.skip("flaky test. https://github.com/apache/incubator-mxnet/issues/8892")
+
@with_seed(1234)
def test_ctc_loss_train():
N = 20
@@ -220,7 +219,7 @@ def test_ctc_loss_train():
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=200, optimizer_params={'learning_rate': 1.},
+ mod.fit(data_iter, num_epoch=200, optimizer_params={'learning_rate': 0.01},
initializer=mx.init.Xavier(magnitude=2), eval_metric=mx.metric.Loss(),
optimizer='adam')
assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 10