未验证 提交 a7be32cc 编写于 作者: W WeiXin 提交者: GitHub

deal with conflict. (#32578)

上级 4ba49af5
......@@ -85,7 +85,8 @@ class TestPyLayer(unittest.TestCase):
z2 = paddle.tanh(input2) + paddle.tanh(input4)
z2.mean().backward()
self.assertTrue(np.max(np.abs((input1.grad - input2.grad))) < 1e-10)
self.assertTrue(
np.max(np.abs((input1.grad.numpy() - input2.grad.numpy()))) < 1e-10)
def test_simple_pylayer_single_output(self):
class tanh(PyLayer):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册