未验证 提交 8c594a84 编写于 作者: Z Zeng Jinle 提交者: GitHub

fix double grad 2, test=develop (#23332)

上级 8814853d
...@@ -152,8 +152,8 @@ class TestDygraphDoubleGrad(TestCase): ...@@ -152,8 +152,8 @@ class TestDygraphDoubleGrad(TestCase):
dz_expected = (np.power(relu_x_np, 3) * relu_x_grad_np * dz_expected = (np.power(relu_x_np, 3) * relu_x_grad_np *
4).astype('float32') 4).astype('float32')
random_grad_y = random_var(y.shape) random_grad_y = random_var(y.shape, low=1, high=2)
random_grad_z = random_var(z.shape) random_grad_z = random_var(z.shape, low=1, high=2)
ones_grad_y = np.ones(y.shape).astype('float32') ones_grad_y = np.ones(y.shape).astype('float32')
ones_grad_z = np.ones(z.shape).astype('float32') ones_grad_z = np.ones(z.shape).astype('float32')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册