From 39fa7bc876fadfa6a71c0b0c6849b1db39fd8b27 Mon Sep 17 00:00:00 2001 From: Xingjian Shi Date: Sun, 15 Sep 2019 23:52:35 -0700 Subject: [PATCH] use 1E-4 in groupnorm test(#16169) --- tests/python/unittest/test_operator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/python/unittest/test_operator.py b/tests/python/unittest/test_operator.py index 40763fabef19..2e7cc3ce7504 100644 --- a/tests/python/unittest/test_operator.py +++ b/tests/python/unittest/test_operator.py @@ -1943,7 +1943,7 @@ def np_groupnorm_grad(ograd, data, gamma, beta, mean, std, num_groups, eps): num_groups=num_groups, eps=eps, output_mean_var=True) check_symbolic_forward(mx_sym, [mx_data, mx_gamma, mx_beta], [np_out, np_mean, np_std], rtol=1e-2 if dtype == np.float16 else 1e-3, - atol=5e-3 if dtype == np.float16 else 1e-5, dtype=dtype) + atol=5e-3 if dtype == np.float16 else 1e-4, dtype=dtype) mx_sym = mx.sym.GroupNorm(data=data_sym, gamma=gamma_sym, beta=beta_sym, num_groups=num_groups, eps=eps, output_mean_var=False) np_ograd = np.random.uniform(-1.0, 1.0, dshape).astype(dtype) @@ -1956,7 +1956,7 @@ def np_groupnorm_grad(ograd, data, gamma, beta, mean, std, num_groups, eps): check_symbolic_backward(mx_sym, [mx_data, mx_gamma, mx_beta], [mx.nd.array(np_ograd)], [np_data_grad, np_gamma_grad, np_beta_grad], rtol=1e-2 if dtype == np.float16 else 1e-3, - atol=5e-2 if dtype == np.float16 else 1e-5, dtype=dtype) + atol=5e-2 if dtype == np.float16 else 1e-4, dtype=dtype) @with_seed()