未验证 提交 e4699231 编写于 作者: S Scotty 提交者: GitHub

fix: remove complex128 relative error constraints (#56822)

上级 a31cf3d2
...@@ -2567,14 +2567,6 @@ class OpTest(unittest.TestCase): ...@@ -2567,14 +2567,6 @@ class OpTest(unittest.TestCase):
numeric_grad_delta = 1e-5 numeric_grad_delta = 1e-5
max_relative_error = 1e-7 max_relative_error = 1e-7
if (
self.dtype == np.complex128
and self.op_type
not in op_threshold_white_list.NEED_FIX_FP64_CHECK_GRAD_THRESHOLD_OP_LIST
):
numeric_grad_delta = 1e-5
max_relative_error = 1e-6
cache_list = None cache_list = None
if hasattr(self, "cache_name_list"): if hasattr(self, "cache_name_list"):
cache_list = self.cache_name_list cache_list = self.cache_name_list
......
...@@ -538,6 +538,8 @@ class TestComplexElementwiseDivOp(OpTest): ...@@ -538,6 +538,8 @@ class TestComplexElementwiseDivOp(OpTest):
self.check_grad( self.check_grad(
['X', 'Y'], ['X', 'Y'],
'Out', 'Out',
numeric_grad_delta=1e-5,
max_relative_error=1e-6,
) )
def test_check_grad_ingore_x(self): def test_check_grad_ingore_x(self):
...@@ -545,6 +547,8 @@ class TestComplexElementwiseDivOp(OpTest): ...@@ -545,6 +547,8 @@ class TestComplexElementwiseDivOp(OpTest):
['Y'], ['Y'],
'Out', 'Out',
no_grad_set=set("X"), no_grad_set=set("X"),
numeric_grad_delta=1e-5,
max_relative_error=1e-6,
) )
def test_check_grad_ingore_y(self): def test_check_grad_ingore_y(self):
...@@ -552,6 +556,8 @@ class TestComplexElementwiseDivOp(OpTest): ...@@ -552,6 +556,8 @@ class TestComplexElementwiseDivOp(OpTest):
['X'], ['X'],
'Out', 'Out',
no_grad_set=set('Y'), no_grad_set=set('Y'),
numeric_grad_delta=1e-5,
max_relative_error=1e-6,
) )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册