提交 65c8eac9 编写于 作者: G GaoWei8 提交者: Tao Luo

Remove self-set accuracy parameters of op tests: max_relative_error (#21741)

* Remove self-set accuracy parameters of op tests: max_relative_error
test=develop

* Remove self-set accuracy parameters of op tests: max_relative_error
test=develop

* Remove self-set parameters of op tests: max_relative_error
test=develop
上级 579a159a
...@@ -62,7 +62,7 @@ class TestLRNMKLDNNOpNHWC(TestLRNMKLDNNOp): ...@@ -62,7 +62,7 @@ class TestLRNMKLDNNOpNHWC(TestLRNMKLDNNOp):
#TODO(jczaja): Add grad support #TODO(jczaja): Add grad support
def test_check_grad_normal(self): def test_check_grad_normal(self):
with self.assertRaises(fluid.core_avx.EnforceNotMet): with self.assertRaises(fluid.core_avx.EnforceNotMet):
self.check_grad(['X'], 'Out', max_relative_error=0.01) self.check_grad(['X'], 'Out')
if __name__ == "__main__": if __name__ == "__main__":
......
...@@ -55,7 +55,7 @@ class TestFSPOp(OpTest): ...@@ -55,7 +55,7 @@ class TestFSPOp(OpTest):
@unittest.skip("Disable temporarily.") @unittest.skip("Disable temporarily.")
def test_check_grad_normal(self): def test_check_grad_normal(self):
self.check_grad(['X', 'Y'], 'Out', max_relative_error=0.05) self.check_grad(['X', 'Y'], 'Out')
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -37,7 +37,7 @@ class TestHingeLossOp(OpTest): ...@@ -37,7 +37,7 @@ class TestHingeLossOp(OpTest):
self.check_output() self.check_output()
def test_check_grad(self): def test_check_grad(self):
self.check_grad(['Logits'], 'Loss', max_relative_error=0.008) self.check_grad(['Logits'], 'Loss')
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -53,7 +53,7 @@ class TestHuberLossOp(OpTest): ...@@ -53,7 +53,7 @@ class TestHuberLossOp(OpTest):
self.check_output() self.check_output()
def test_check_grad_normal(self): def test_check_grad_normal(self):
self.check_grad(['X', 'Y'], 'Out', max_relative_error=0.008) self.check_grad(['X', 'Y'], 'Out')
def test_check_grad_ingore_x(self): def test_check_grad_ingore_x(self):
self.check_grad( self.check_grad(
......
...@@ -40,7 +40,7 @@ class TestMulOp(OpTest): ...@@ -40,7 +40,7 @@ class TestMulOp(OpTest):
self.check_output() self.check_output()
def test_check_grad_normal(self): def test_check_grad_normal(self):
self.check_grad(['X', 'Y'], 'Out', max_relative_error=0.5) self.check_grad(['X', 'Y'], 'Out')
def test_check_grad_ingore_x(self): def test_check_grad_ingore_x(self):
self.check_grad( self.check_grad(
...@@ -91,7 +91,7 @@ class TestMulOp2(OpTest): ...@@ -91,7 +91,7 @@ class TestMulOp2(OpTest):
self.check_output() self.check_output()
def test_check_grad_normal(self): def test_check_grad_normal(self):
self.check_grad(['X', 'Y'], 'Out', max_relative_error=0.5) self.check_grad(['X', 'Y'], 'Out')
def test_check_grad_ingore_x(self): def test_check_grad_ingore_x(self):
self.check_grad( self.check_grad(
......
...@@ -53,7 +53,7 @@ class TestPad2dOp(OpTest): ...@@ -53,7 +53,7 @@ class TestPad2dOp(OpTest):
self.check_output() self.check_output()
def test_check_grad_normal(self): def test_check_grad_normal(self):
self.check_grad(['X'], 'Out', max_relative_error=0.006) self.check_grad(['X'], 'Out')
def initTestCase(self): def initTestCase(self):
self.shape = (2, 3, 4, 5) self.shape = (2, 3, 4, 5)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册