From f680255fbff25818ed3eee0d4541d80b3c7b9d9d Mon Sep 17 00:00:00 2001 From: Hao Jin Date: Mon, 20 May 2019 22:31:58 -0700 Subject: [PATCH] bump up atol for test_bilinear_resize_op (#15011) --- tests/python/unittest/test_operator.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/python/unittest/test_operator.py b/tests/python/unittest/test_operator.py index 56607dcf2c21..b5aa06964b29 100644 --- a/tests/python/unittest/test_operator.py +++ b/tests/python/unittest/test_operator.py @@ -7441,16 +7441,16 @@ def check_bilinear_resize_modes_op(shape, scale_height=None, scale_width=None, s assert_almost_equal(y.asnumpy(), expected, 1e-3, 0) if mode != 'like': resize_sym = mx.sym.contrib.BilinearResize2D(data_sym, None, scale_height=scale_height, scale_width=scale_width, mode=mode) - check_symbolic_forward(resize_sym, [data_np], [expected], rtol=1e-3) - check_symbolic_backward(resize_sym, [data_np], [out_grads], expected_backward, rtol=1e-3) - check_numeric_gradient(resize_sym, [data_np]) + check_symbolic_forward(resize_sym, [data_np], [expected], rtol=1e-3, atol=1e-5) + check_symbolic_backward(resize_sym, [data_np], [out_grads], expected_backward, rtol=1e-3, atol=1e-5) + check_numeric_gradient(resize_sym, [data_np], rtol=1e-2, atol=1e-5) else: data_sym_like = mx.sym.var('data_like') resize_sym = mx.sym.contrib.BilinearResize2D(data_sym, data_sym_like, mode=mode) date_np_like = x_1.asnumpy() - check_symbolic_forward(resize_sym, [data_np, date_np_like], [expected], rtol=1e-3) - check_symbolic_backward(resize_sym, [data_np, date_np_like], [out_grads], expected_backward, rtol=1e-3) - check_numeric_gradient(resize_sym, [data_np, date_np_like]) + check_symbolic_forward(resize_sym, [data_np, date_np_like], [expected], rtol=1e-3, atol=1e-5) + check_symbolic_backward(resize_sym, [data_np, date_np_like], [out_grads], expected_backward, rtol=1e-3, atol=1e-5) + check_numeric_gradient(resize_sym, [data_np, date_np_like], rtol=1e-2, atol=1e-5) shape = (2, 2, 10, 10) check_bilinear_resize_op(shape, 5, 5)