You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ns...@apache.org on 2018/08/02 04:30:12 UTC
[incubator-mxnet] branch master updated: [MXNET-751] fix ce_loss
flaky (#11971)
This is an automated email from the ASF dual-hosted git repository.
nswamy 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 a93905d [MXNET-751] fix ce_loss flaky (#11971)
a93905d is described below
commit a93905dcbdbf5f50a769eebc76446f995368e68d
Author: Lanking <la...@live.com>
AuthorDate: Wed Aug 1 21:30:00 2018 -0700
[MXNET-751] fix ce_loss flaky (#11971)
* add xavier initializer
* remove comment line
---
tests/python/unittest/test_loss.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/python/unittest/test_loss.py b/tests/python/unittest/test_loss.py
index 8d5b863..3c147bc 100644
--- a/tests/python/unittest/test_loss.py
+++ b/tests/python/unittest/test_loss.py
@@ -64,7 +64,8 @@ def get_net(num_hidden, flatten=True):
fc3 = mx.symbol.FullyConnected(act2, name='fc3', num_hidden=num_hidden, flatten=flatten)
return fc3
-@with_seed(1234)
+# tracked at: https://github.com/apache/incubator-mxnet/issues/11692
+@with_seed()
def test_ce_loss():
nclass = 10
N = 20
@@ -78,7 +79,8 @@ def test_ce_loss():
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': 0.01},
- eval_metric=mx.metric.Loss(), optimizer='adam')
+ eval_metric=mx.metric.Loss(), optimizer='adam',
+ initializer=mx.init.Xavier(magnitude=2))
assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.05