提交 6882b8eb 编写于 作者: Z zhongpu 提交者: Chen Weihang

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

上级 5750152e
...@@ -121,7 +121,7 @@ class TestMnist(unittest.TestCase): ...@@ -121,7 +121,7 @@ class TestMnist(unittest.TestCase):
if not fluid.is_compiled_with_cuda(): if not fluid.is_compiled_with_cuda():
return return
x = np.random.randn(1, 3, 224, 224).astype("float16") 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)): with fluid.dygraph.guard(fluid.CUDAPlace(0)):
model = MNIST(dtype="float16") model = MNIST(dtype="float16")
x = fluid.dygraph.to_variable(x) x = fluid.dygraph.to_variable(x)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册