From 579a159a7bd2271ff15b737d8c4ec650746c01ab Mon Sep 17 00:00:00 2001 From: GaoWei8 <53294385+GaoWei8@users.noreply.github.com> Date: Wed, 18 Dec 2019 10:18:07 +0800 Subject: [PATCH] Remove self-set accuracy parameters of op tests: max_relative_error (#21739) * Remove self-set accuracy parameters of op tests: max_relative_error test=develop * Remove self-set accuracy parameters of op tests test=develop * keep smaller parameters test=develop --- python/paddle/fluid/tests/unittests/test_conv_shift_op.py | 2 +- python/paddle/fluid/tests/unittests/test_crop_op.py | 2 +- python/paddle/fluid/tests/unittests/test_crop_tensor_op.py | 4 ++-- python/paddle/fluid/tests/unittests/test_lrn_op.py | 2 +- .../fluid/tests/unittests/test_modified_huber_loss_op.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_conv_shift_op.py b/python/paddle/fluid/tests/unittests/test_conv_shift_op.py index 9305ef7b194..c4dbf4c3e22 100644 --- a/python/paddle/fluid/tests/unittests/test_conv_shift_op.py +++ b/python/paddle/fluid/tests/unittests/test_conv_shift_op.py @@ -48,7 +48,7 @@ class TestConvShiftOp(OpTest): self.check_output() def test_check_grad_normal(self): - self.check_grad(['X', 'Y'], 'Out', max_relative_error=0.05) + self.check_grad(['X', 'Y'], 'Out') def test_check_grad_ignore_x(self): self.check_grad( diff --git a/python/paddle/fluid/tests/unittests/test_crop_op.py b/python/paddle/fluid/tests/unittests/test_crop_op.py index d7bcfba8dea..902b8605bab 100644 --- a/python/paddle/fluid/tests/unittests/test_crop_op.py +++ b/python/paddle/fluid/tests/unittests/test_crop_op.py @@ -74,7 +74,7 @@ class TestCropOp(OpTest): self.check_output() def test_check_grad_normal(self): - self.check_grad(['X'], 'Out', max_relative_error=0.006) + self.check_grad(['X'], 'Out') class TestCase1(TestCropOp): diff --git a/python/paddle/fluid/tests/unittests/test_crop_tensor_op.py b/python/paddle/fluid/tests/unittests/test_crop_tensor_op.py index b9be58a291d..a4d5b849ab5 100644 --- a/python/paddle/fluid/tests/unittests/test_crop_tensor_op.py +++ b/python/paddle/fluid/tests/unittests/test_crop_tensor_op.py @@ -80,7 +80,7 @@ class TestCropTensorOp(OpTest): self.check_output() def test_check_grad_normal(self): - self.check_grad(['X'], 'Out', max_relative_error=0.006) + self.check_grad(['X'], 'Out') class TestCase1(TestCropTensorOp): @@ -178,7 +178,7 @@ class TestCropTensorOpTensorAttr(OpTest): self.check_output() def test_check_grad_normal(self): - self.check_grad(["X"], "Out", max_relative_error=0.006) + self.check_grad(["X"], "Out") class TestCropTensorOpTensorAttrCase1(TestCropTensorOpTensorAttr): diff --git a/python/paddle/fluid/tests/unittests/test_lrn_op.py b/python/paddle/fluid/tests/unittests/test_lrn_op.py index bf6b555c466..fa8dba980bb 100644 --- a/python/paddle/fluid/tests/unittests/test_lrn_op.py +++ b/python/paddle/fluid/tests/unittests/test_lrn_op.py @@ -98,7 +98,7 @@ class TestLRNOp(OpTest): self.check_output() def test_check_grad_normal(self): - self.check_grad(['X'], 'Out', max_relative_error=0.01) + self.check_grad(['X'], 'Out') class TestLRNOpAttrDataFormat(TestLRNOp): diff --git a/python/paddle/fluid/tests/unittests/test_modified_huber_loss_op.py b/python/paddle/fluid/tests/unittests/test_modified_huber_loss_op.py index 86349f852c7..f7b6ad9bfee 100644 --- a/python/paddle/fluid/tests/unittests/test_modified_huber_loss_op.py +++ b/python/paddle/fluid/tests/unittests/test_modified_huber_loss_op.py @@ -57,7 +57,7 @@ class TestModifiedHuberLossOp(OpTest): self.check_output() def test_check_grad(self): - self.check_grad(['X'], 'Out', max_relative_error=0.01) + self.check_grad(['X'], 'Out') if __name__ == '__main__': -- GitLab