From bcb1516d119a6888b9c35bb7ffdffaddae652340 Mon Sep 17 00:00:00 2001 From: yuyang18 Date: Fri, 13 Jul 2018 15:58:13 +0800 Subject: [PATCH] Run test startup --- python/paddle/fluid/tests/demo/pyreader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/tests/demo/pyreader.py b/python/paddle/fluid/tests/demo/pyreader.py index 356a27cdd4..9fddef3c24 100644 --- a/python/paddle/fluid/tests/demo/pyreader.py +++ b/python/paddle/fluid/tests/demo/pyreader.py @@ -75,11 +75,13 @@ def main(): adam.minimize(loss) test_prog = fluid.Program() - with fluid.program_guard(test_prog, fluid.Program()): + test_startup = fluid.Program() + with fluid.program_guard(test_prog, test_startup): with fluid.unique_name.guard(): test_loss, test_queue, test_reader = network(False) fluid.Executor(fluid.CUDAPlace(0)).run(startup_prog) + fluid.Executor(fluid.CUDAPlace(0)).run(test_startup) trainer = fluid.ParallelExecutor( use_cuda=True, loss_name=loss.name, main_program=train_prog) -- GitLab