未验证 提交 0cb0f70a 编写于 作者: 石晓伟 提交者: GitHub

check the precision of cast operator test (#52317)

上级 4a790cba
...@@ -68,7 +68,7 @@ class TestCastOpFp16ToFp32(OpTest): ...@@ -68,7 +68,7 @@ class TestCastOpFp16ToFp32(OpTest):
self.public_python_api = cast_wrapper self.public_python_api = cast_wrapper
def test_check_output(self): def test_check_output(self):
self.check_output(atol=1e-3) self.check_output()
def test_grad(self): def test_grad(self):
self.check_grad(['X'], ['Out'], check_prim=True, only_check_prim=True) self.check_grad(['X'], ['Out'], check_prim=True, only_check_prim=True)
...@@ -89,7 +89,7 @@ class TestCastOpFp32ToFp16(OpTest): ...@@ -89,7 +89,7 @@ class TestCastOpFp32ToFp16(OpTest):
self.public_python_api = cast_wrapper self.public_python_api = cast_wrapper
def test_check_output(self): def test_check_output(self):
self.check_output(atol=1e-3) self.check_output()
def test_grad(self): def test_grad(self):
self.check_grad(['X'], ['Out'], check_prim=True, only_check_prim=True) self.check_grad(['X'], ['Out'], check_prim=True, only_check_prim=True)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册