From 4670a0a206590434e1e795ff3d8bc292c70fb545 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Tue, 8 Jun 2021 19:31:28 +0800 Subject: [PATCH] fix test_fc_op (#33417) --- python/paddle/fluid/tests/unittests/test_fc_op.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/paddle/fluid/tests/unittests/test_fc_op.py b/python/paddle/fluid/tests/unittests/test_fc_op.py index 3bbc8df1882..22126ce41d0 100644 --- a/python/paddle/fluid/tests/unittests/test_fc_op.py +++ b/python/paddle/fluid/tests/unittests/test_fc_op.py @@ -138,6 +138,7 @@ class TestFcOp_NumFlattenDims_NegOne(unittest.TestCase): def test_api(self): def run_program(num_flatten_dims): paddle.seed(SEED) + np.random.seed(SEED) startup_program = Program() main_program = Program() @@ -158,6 +159,7 @@ class TestFcOp_NumFlattenDims_NegOne(unittest.TestCase): exe = fluid.Executor(place=place) exe.run(startup_program) out = exe.run(main_program, feed={"x": input}, fetch_list=[out]) + return out res_1 = run_program(-1) res_2 = run_program(2) -- GitLab