From 0cb0f70afd721321791752766b1d2e074b82edff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E6=99=93=E4=BC=9F?= <39303645+Shixiaowei02@users.noreply.github.com> Date: Tue, 11 Apr 2023 10:04:39 +0800 Subject: [PATCH] check the precision of cast operator test (#52317) --- python/paddle/fluid/tests/unittests/test_cast_op.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_cast_op.py b/python/paddle/fluid/tests/unittests/test_cast_op.py index 816c507cea7..baa5bc3d90d 100644 --- a/python/paddle/fluid/tests/unittests/test_cast_op.py +++ b/python/paddle/fluid/tests/unittests/test_cast_op.py @@ -68,7 +68,7 @@ class TestCastOpFp16ToFp32(OpTest): self.public_python_api = cast_wrapper def test_check_output(self): - self.check_output(atol=1e-3) + self.check_output() def test_grad(self): self.check_grad(['X'], ['Out'], check_prim=True, only_check_prim=True) @@ -89,7 +89,7 @@ class TestCastOpFp32ToFp16(OpTest): self.public_python_api = cast_wrapper def test_check_output(self): - self.check_output(atol=1e-3) + self.check_output() def test_grad(self): self.check_grad(['X'], ['Out'], check_prim=True, only_check_prim=True) -- GitLab