From 81ac88fb4f138a5cb14f3cbe2d64179e4bbde26c Mon Sep 17 00:00:00 2001 From: JYChen Date: Tue, 14 Sep 2021 11:39:45 +0800 Subject: [PATCH] fix random seed to avoid UT random failed (#35699) --- python/paddle/fluid/tests/unittests/test_group_norm_op_v2.py | 1 + 1 file changed, 1 insertion(+) 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 a22233dfcc8c6..2f3adbe861a1f 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 @@ -129,6 +129,7 @@ def test_numerical_accuracy(self): paddle.disable_static() shapes = [(2, 6), (2, 6, 4), (2, 6, 4, 4), (2, 6, 6, 6, 2), (2, 6, 6, 6, 2, 3)] + np.random.seed(10) places = [fluid.CPUPlace()] if core.is_compiled_with_cuda() and core.op_support_gpu("group_norm"): places.append(fluid.CUDAPlace(0))