This is an automated email from the ASF dual-hosted git repository.

jxie 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 17643e7  Update test_sparse_operator.py (#10050)
17643e7 is described below

commit 17643e78673d12e11977ccbc249b4cbbf3a898c6
Author: Haibin Lin <linhaibin.e...@gmail.com>
AuthorDate: Sat Mar 10 13:16:00 2018 +0800

    Update test_sparse_operator.py (#10050)
---
 tests/python/unittest/test_sparse_operator.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/python/unittest/test_sparse_operator.py 
b/tests/python/unittest/test_sparse_operator.py
index 4e5d354..a8bf5a5 100644
--- a/tests/python/unittest/test_sparse_operator.py
+++ b/tests/python/unittest/test_sparse_operator.py
@@ -1662,10 +1662,10 @@ def test_sparse_embedding():
             weight[:] = rand_ndarray(weight.shape, 'row_sparse', 
density=density)
             # check forward
             exe_test.forward(is_train=True)
-            assert_almost_equal(exe_test.outputs[0].asnumpy(), 
np.dot(np_onehot, weight.asnumpy()))
+            assert_almost_equal(exe_test.outputs[0].asnumpy(), 
np.dot(np_onehot, weight.asnumpy()), atol=1e-4)
             # check backward
             exe_test.backward([grad])
-            assert_almost_equal(grad_map["embed_weight"].asnumpy(), 
np.dot(np_onehot.T, grad.asnumpy()))
+            assert_almost_equal(grad_map["embed_weight"].asnumpy(), 
np.dot(np_onehot.T, grad.asnumpy()), atol=1e-4)
 
     densities = [0, 0.5, 1]
     in_dim = 50

-- 
To stop receiving notification emails like this one, please contact
j...@apache.org.

Reply via email to