From 92f83e46aaa7dfd75a8bfbb68d8caaf8c16d6916 Mon Sep 17 00:00:00 2001 From: GaoWei8 <53294385+GaoWei8@users.noreply.github.com> Date: Mon, 16 Dec 2019 17:07:42 +0800 Subject: [PATCH] fix accuracy parameters of op tests (#21729) test=develop --- .../paddle/fluid/tests/unittests/test_elementwise_max_op.py | 2 +- .../paddle/fluid/tests/unittests/test_elementwise_min_op.py | 2 +- .../paddle/fluid/tests/unittests/test_elementwise_sub_op.py | 2 +- .../tests/unittests/test_fused_elemwise_activation_op.py | 4 ++-- .../fluid/tests/unittests/test_sequence_topk_avg_pooling.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_elementwise_max_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_max_op.py index acb45d54733..efe91886271 100644 --- a/python/paddle/fluid/tests/unittests/test_elementwise_max_op.py +++ b/python/paddle/fluid/tests/unittests/test_elementwise_max_op.py @@ -35,7 +35,7 @@ class TestElementwiseOp(OpTest): self.check_output() def test_check_grad_normal(self): - self.check_grad(['X', 'Y'], 'Out', max_relative_error=0.005) + self.check_grad(['X', 'Y'], 'Out') def test_check_grad_ingore_x(self): self.check_grad( diff --git a/python/paddle/fluid/tests/unittests/test_elementwise_min_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_min_op.py index 19d139f305d..a25b5994a62 100644 --- a/python/paddle/fluid/tests/unittests/test_elementwise_min_op.py +++ b/python/paddle/fluid/tests/unittests/test_elementwise_min_op.py @@ -35,7 +35,7 @@ class TestElementwiseOp(OpTest): self.check_output() def test_check_grad_normal(self): - self.check_grad(['X', 'Y'], 'Out', max_relative_error=0.005) + self.check_grad(['X', 'Y'], 'Out') def test_check_grad_ingore_x(self): self.check_grad( diff --git a/python/paddle/fluid/tests/unittests/test_elementwise_sub_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_sub_op.py index 2e82f8dd41c..5a5e47f163c 100644 --- a/python/paddle/fluid/tests/unittests/test_elementwise_sub_op.py +++ b/python/paddle/fluid/tests/unittests/test_elementwise_sub_op.py @@ -31,7 +31,7 @@ class TestElementwiseOp(OpTest): self.check_output() def test_check_grad_normal(self): - self.check_grad(['X', 'Y'], 'Out', max_relative_error=0.005) + self.check_grad(['X', 'Y'], 'Out') def test_check_grad_ingore_x(self): self.check_grad( diff --git a/python/paddle/fluid/tests/unittests/test_fused_elemwise_activation_op.py b/python/paddle/fluid/tests/unittests/test_fused_elemwise_activation_op.py index d371acc117e..e00dc8c7688 100644 --- a/python/paddle/fluid/tests/unittests/test_fused_elemwise_activation_op.py +++ b/python/paddle/fluid/tests/unittests/test_fused_elemwise_activation_op.py @@ -90,9 +90,9 @@ def create_test_class(test_case, if not grad_chek: return if self.attrs["save_intermediate_out"]: - self.check_grad(['X', 'Y'], ['Out'], max_relative_error=0.005) + self.check_grad(['X', 'Y'], ['Out']) else: - self.check_grad(['X', 'Y'], ['Out'], max_relative_error=0.005) + self.check_grad(['X', 'Y'], ['Out']) def test_check_grad_ingore_x(self): if not grad_chek: diff --git a/python/paddle/fluid/tests/unittests/test_sequence_topk_avg_pooling.py b/python/paddle/fluid/tests/unittests/test_sequence_topk_avg_pooling.py index 0311421141c..840997d4a19 100644 --- a/python/paddle/fluid/tests/unittests/test_sequence_topk_avg_pooling.py +++ b/python/paddle/fluid/tests/unittests/test_sequence_topk_avg_pooling.py @@ -116,7 +116,7 @@ class TestSequenceTopkAvgPoolingOp(OpTest): self.check_output() def test_check_grad(self): - self.check_grad(['X'], 'Out', max_relative_error=0.005) + self.check_grad(['X'], 'Out') class TestSequenceTopkAvgPoolingOpCase1(TestSequenceTopkAvgPoolingOp): -- GitLab