From e6a4d1705a3279d7d154d52aca894b62c516fa11 Mon Sep 17 00:00:00 2001 From: wangxinxin08 <69842442+wangxinxin08@users.noreply.github.com> Date: Tue, 13 Oct 2020 13:07:56 +0800 Subject: [PATCH] modify dtype in doublegrad matmul ut (#27868) --- python/paddle/fluid/tests/unittests/test_nn_grad.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_nn_grad.py b/python/paddle/fluid/tests/unittests/test_nn_grad.py index 1675f935f7..899c1f798e 100644 --- a/python/paddle/fluid/tests/unittests/test_nn_grad.py +++ b/python/paddle/fluid/tests/unittests/test_nn_grad.py @@ -161,10 +161,10 @@ class TestMatmulDoubleGradCheck(unittest.TestCase): y_shapes = [[2], [3, 2], [2, 4, 5], [2, 3, 3, 5], [4, 3]] transpose_xs = [False, True, True, False, False] transpose_ys = [False, True, False, True, False] - dtypes = [np.float64, np.float64, np.float32, np.float32, np.float64] - typenames = ["float64", "float64", "float32", "float32", "float64"] - for i, (x_shape, y_shape, transpose_x, transpose_y, dtype, typename) \ - in enumerate(zip(x_shapes, y_shapes, transpose_xs, transpose_ys, dtypes, typenames)): + dtype = np.float64 + typename = "float64" + for i, (x_shape, y_shape, transpose_x, transpose_y) \ + in enumerate(zip(x_shapes, y_shapes, transpose_xs, transpose_ys)): x = layers.create_parameter( dtype=typename, shape=x_shape, name='x{}'.format(i)) y = layers.create_parameter( -- GitLab