未验证 提交 370fdaa1 编写于 作者: Z zhongpu 提交者: GitHub

fix bug fot test_dygraph_mnist_fp16.py, test=develop (#22222) (#22536)

上级 da338d76
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册