未验证 提交 cb7d8595 编写于 作者: J JYChen 提交者: GitHub

fix random seed to avoid UT random failed (#35699)

上级 0f741880
...@@ -129,6 +129,7 @@ class TestGroupNormAPIV2_With_General_Dimensions(unittest.TestCase): ...@@ -129,6 +129,7 @@ class TestGroupNormAPIV2_With_General_Dimensions(unittest.TestCase):
paddle.disable_static() paddle.disable_static()
shapes = [(2, 6), (2, 6, 4), (2, 6, 4, 4), (2, 6, 6, 6, 2), (2, 6, 6, 6, shapes = [(2, 6), (2, 6, 4), (2, 6, 4, 4), (2, 6, 6, 6, 2), (2, 6, 6, 6,
2, 3)] 2, 3)]
np.random.seed(10)
places = [fluid.CPUPlace()] places = [fluid.CPUPlace()]
if core.is_compiled_with_cuda() and core.op_support_gpu("group_norm"): if core.is_compiled_with_cuda() and core.op_support_gpu("group_norm"):
places.append(fluid.CUDAPlace(0)) places.append(fluid.CUDAPlace(0))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册