Skip to content

Commit 370fdaa

Browse files
authored
fix bug fot test_dygraph_mnist_fp16.py, test=develop (#22222) (#22536)
1 parent da338d7 commit 370fdaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/paddle/fluid/tests/unittests/test_dygraph_mnist_fp16.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def test_mnist_fp16(self):
121121
if not fluid.is_compiled_with_cuda():
122122
return
123123
x = np.random.randn(1, 3, 224, 224).astype("float16")
124-
y = np.random.randn(1, 1).astype("int64")
124+
y = np.random.randint(10, size=[1, 1], dtype="int64")
125125
with fluid.dygraph.guard(fluid.CUDAPlace(0)):
126126
model = MNIST(dtype="float16")
127127
x = fluid.dygraph.to_variable(x)

0 commit comments

Comments
 (0)