From 8c594a84e162980f1e868b534ea92c3d2c3d0aa6 Mon Sep 17 00:00:00 2001 From: Zeng Jinle <32832641+sneaxiy@users.noreply.github.com> Date: Tue, 31 Mar 2020 19:51:00 -0500 Subject: [PATCH] fix double grad 2, test=develop (#23332) --- .../fluid/tests/unittests/test_imperative_double_grad.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_imperative_double_grad.py b/python/paddle/fluid/tests/unittests/test_imperative_double_grad.py index 0fa1556a02..5f1d020bff 100644 --- a/python/paddle/fluid/tests/unittests/test_imperative_double_grad.py +++ b/python/paddle/fluid/tests/unittests/test_imperative_double_grad.py @@ -152,8 +152,8 @@ class TestDygraphDoubleGrad(TestCase): dz_expected = (np.power(relu_x_np, 3) * relu_x_grad_np * 4).astype('float32') - random_grad_y = random_var(y.shape) - random_grad_z = random_var(z.shape) + random_grad_y = random_var(y.shape, low=1, high=2) + random_grad_z = random_var(z.shape, low=1, high=2) ones_grad_y = np.ones(y.shape).astype('float32') ones_grad_z = np.ones(z.shape).astype('float32') -- GitLab