未验证 提交 bcdeadcd 编写于 作者: L Leo Chen 提交者: GitHub

Fix bug of test_var_vase (#24703)

上级 ca68b13f
......@@ -50,7 +50,7 @@ class TestVarBase(unittest.TestCase):
def test_tensor_to_variable(self):
with fluid.dygraph.guard():
t = fluid.Tensor()
t.set(np.ndarray([5, 30]), fluid.CPUPlace())
t.set(np.random.random((1024, 1024)), fluid.CPUPlace())
var = fluid.dygraph.to_variable(t)
self.assertTrue(np.array_equal(t, var.numpy()))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册