From 6e16a0997c7017f3167fe6b672d92c4e5bfefc42 Mon Sep 17 00:00:00 2001 From: zhang wenhui Date: Fri, 25 Sep 2020 13:05:22 +0800 Subject: [PATCH] fix unittest_group_norm_op_v2, test=develop (#27486) * fix unittest_group_norm_op_v2, test=develop * fix unittest_group_norm_op_v2, test=develop --- python/paddle/fluid/tests/unittests/test_group_norm_op_v2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/tests/unittests/test_group_norm_op_v2.py b/python/paddle/fluid/tests/unittests/test_group_norm_op_v2.py index a46b9b0ca78..833eeb33641 100644 --- a/python/paddle/fluid/tests/unittests/test_group_norm_op_v2.py +++ b/python/paddle/fluid/tests/unittests/test_group_norm_op_v2.py @@ -56,7 +56,10 @@ class TestDygraphGroupNormv2(unittest.TestCase): x = np.random.randn(*shape).astype("float32") y1 = compute_v1(x) y2 = compute_v2(x) - self.assertTrue(np.allclose(y1, y2)) + result = np.allclose(y1, y2) + if not result: + print("y1:", y1, "\ty2:", y2) + self.assertTrue(result) test_weight_bias_false() def test_static(self): -- GitLab