From 14fd6cfbd3db55b8421874f5ebb07bf7ddaf33bf Mon Sep 17 00:00:00 2001 From: pangyoki Date: Tue, 13 Jul 2021 21:06:24 +0800 Subject: [PATCH] fix gelu grad precision (#34089) --- python/paddle/fluid/tests/unittests/npu/test_gelu_op_npu.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/tests/unittests/npu/test_gelu_op_npu.py b/python/paddle/fluid/tests/unittests/npu/test_gelu_op_npu.py index d811aaf228d..4127c738288 100644 --- a/python/paddle/fluid/tests/unittests/npu/test_gelu_op_npu.py +++ b/python/paddle/fluid/tests/unittests/npu/test_gelu_op_npu.py @@ -60,7 +60,10 @@ class TestGelu(OpTest): def test_check_grad(self): self.check_grad_with_place( - self.place, ['X'], 'Out', check_dygraph=False) + self.place, ['X'], + 'Out', + check_dygraph=False, + max_relative_error=0.007) @unittest.skipIf(not paddle.is_compiled_with_npu(), -- GitLab