diff --git a/tests/python/unittest/test_operator.py b/tests/python/unittest/test_operator.py index 7db07596d7f8..9f27ddedc8fe 100644 --- a/tests/python/unittest/test_operator.py +++ b/tests/python/unittest/test_operator.py @@ -7331,16 +7331,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)