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

fix random failure (#27996)

上级 ffcc1175
...@@ -599,9 +599,9 @@ class TestUniformInitializerDygraph(unittest.TestCase): ...@@ -599,9 +599,9 @@ class TestUniformInitializerDygraph(unittest.TestCase):
""" """
paddle.disable_static() paddle.disable_static()
tensor = paddle.zeros([1024, 1024]) tensor = paddle.zeros([1024, 1024, 16])
tensor.stop_gradient = False tensor.stop_gradient = False
self.assertTrue(np.allclose(np.zeros((1024, 1024)), tensor.numpy())) self.assertTrue(np.allclose(np.zeros((1024, 1024, 16)), tensor.numpy()))
uniform_ = paddle.nn.initializer.Uniform() uniform_ = paddle.nn.initializer.Uniform()
uniform_(tensor) uniform_(tensor)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册