From 78b1026fa3a65652cea5bd9831771a65f24dec25 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Fri, 16 Oct 2020 16:31:10 +0800 Subject: [PATCH] fix random failure (#27996) --- python/paddle/fluid/tests/unittests/test_initializer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_initializer.py b/python/paddle/fluid/tests/unittests/test_initializer.py index 92135b113a..952265e119 100644 --- a/python/paddle/fluid/tests/unittests/test_initializer.py +++ b/python/paddle/fluid/tests/unittests/test_initializer.py @@ -599,9 +599,9 @@ class TestUniformInitializerDygraph(unittest.TestCase): """ paddle.disable_static() - tensor = paddle.zeros([1024, 1024]) + tensor = paddle.zeros([1024, 1024, 16]) 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_(tensor) -- GitLab