You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by sk...@apache.org on 2018/08/24 22:36:51 UTC
[incubator-mxnet] branch master updated: set proper atol for
check_with_uniform (#12313)
This is an automated email from the ASF dual-hosted git repository.
skm 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 4e6366c set proper atol for check_with_uniform (#12313)
4e6366c is described below
commit 4e6366cd896d8fe93472701ef773de67961d6df7
Author: Hao Jin <ha...@users.noreply.github.com>
AuthorDate: Fri Aug 24 15:36:42 2018 -0700
set proper atol for check_with_uniform (#12313)
---
tests/python/unittest/test_ndarray.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/python/unittest/test_ndarray.py b/tests/python/unittest/test_ndarray.py
index 071c770..9d07dea 100644
--- a/tests/python/unittest/test_ndarray.py
+++ b/tests/python/unittest/test_ndarray.py
@@ -56,9 +56,9 @@ def check_with_uniform(uf, arg_shapes, dim=None, npuf=None, rmin=-10, type_list=
if isinstance(out1, mx.nd.NDArray):
out1 = out1.asnumpy()
if dtype == np.float16:
- assert_almost_equal(out1, out2, rtol=2e-3)
+ assert_almost_equal(out1, out2, rtol=2e-3, atol=1e-5)
else:
- assert_almost_equal(out1, out2)
+ assert_almost_equal(out1, out2, atol=1e-5)
def random_ndarray(dim):
shape = tuple(np.random.randint(1, int(1000**(1.0/dim)), size=dim))