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 0fa1556a02a24f21eef32d38cd0727eb2a6c5e6a..5f1d020bff89c12f81f413d2eb803771ed782598 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')