From def272cf42e9b2ebf529b39f183874a1dede9c2a Mon Sep 17 00:00:00 2001 From: Michal Gallus Date: Fri, 16 Nov 2018 15:29:15 +0100 Subject: [PATCH] MKLDNN elementwise_mul: Revert changes to eltwise_add tests --- .../paddle/fluid/tests/unittests/test_elementwise_add_op.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/paddle/fluid/tests/unittests/test_elementwise_add_op.py b/python/paddle/fluid/tests/unittests/test_elementwise_add_op.py index d71a9c0151..5aec5d8e38 100644 --- a/python/paddle/fluid/tests/unittests/test_elementwise_add_op.py +++ b/python/paddle/fluid/tests/unittests/test_elementwise_add_op.py @@ -43,13 +43,19 @@ class TestElementwiseAddOp(OpTest): self.check_output() def test_check_grad_normal(self): + if self.dtype == np.float16: + return self.check_grad(['X', 'Y'], 'Out', max_relative_error=0.005) def test_check_grad_ingore_x(self): + if self.dtype == np.float16: + return self.check_grad( ['Y'], 'Out', max_relative_error=0.005, no_grad_set=set("X")) def test_check_grad_ingore_y(self): + if self.dtype == np.float16: + return self.check_grad( ['X'], 'Out', max_relative_error=0.005, no_grad_set=set('Y')) -- GitLab