Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 94d3c06

Browse files
anirudh2290piiswrong
authored andcommitted
Fix test_cast (#9951)
1 parent 8780096 commit 94d3c06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/python/unittest/test_operator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3229,8 +3229,8 @@ def test_cast():
32293229
exe.arg_arrays[0][:] = X
32303230
exe.forward(is_train=True)
32313231
exe.backward(mx.nd.array(X, dtype=dsttype, ctx=default_context()))
3232-
assert_almost_equal(exe.outputs[0].asnumpy(), X.astype(srctype).astype(dsttype), rtol=1e-3)
3233-
assert_almost_equal(exe.grad_arrays[0].asnumpy(), X.astype(dsttype).astype(srctype), rtol=1e-3)
3232+
assert_almost_equal(exe.outputs[0].asnumpy(), X.astype(srctype).astype(dsttype), rtol=1e-3, atol=1e-5)
3233+
assert_almost_equal(exe.grad_arrays[0].asnumpy(), X.astype(dsttype).astype(srctype), rtol=1e-3, atol=1e-5)
32343234

32353235

32363236
@with_seed()

0 commit comments

Comments
 (0)