From 6882b8ebfa404c20bed279fc2cfb754485884169 Mon Sep 17 00:00:00 2001 From: zhongpu <2013000149@qq.com> Date: Sat, 11 Jan 2020 11:10:44 +0800 Subject: [PATCH] fix bug fot test_dygraph_mnist_fp16.py, test=develop (#22222) --- python/paddle/fluid/tests/unittests/test_dygraph_mnist_fp16.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/fluid/tests/unittests/test_dygraph_mnist_fp16.py b/python/paddle/fluid/tests/unittests/test_dygraph_mnist_fp16.py index 0efc887384d..7503a9172fc 100644 --- a/python/paddle/fluid/tests/unittests/test_dygraph_mnist_fp16.py +++ b/python/paddle/fluid/tests/unittests/test_dygraph_mnist_fp16.py @@ -121,7 +121,7 @@ class TestMnist(unittest.TestCase): if not fluid.is_compiled_with_cuda(): return x = np.random.randn(1, 3, 224, 224).astype("float16") - y = np.random.randn(1, 1).astype("int64") + y = np.random.randint(10, size=[1, 1], dtype="int64") with fluid.dygraph.guard(fluid.CUDAPlace(0)): model = MNIST(dtype="float16") x = fluid.dygraph.to_variable(x) -- GitLab