From 389ea18a4e95f19cfc78cae6fc46d5096a648a91 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Mon, 19 Mar 2018 15:13:04 +0800 Subject: [PATCH] Debug code --- .../tests/unittests/test_parallel_executor.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_parallel_executor.py b/python/paddle/fluid/tests/unittests/test_parallel_executor.py index 1cea14fb9..e8976ff05 100644 --- a/python/paddle/fluid/tests/unittests/test_parallel_executor.py +++ b/python/paddle/fluid/tests/unittests/test_parallel_executor.py @@ -71,12 +71,13 @@ class ParallelExecutor(unittest.TestCase): first_loss = numpy.array(fluid.global_scope().find_var('fetched_var') .get_lod_tensor_array()[0]) - - for i in xrange(10): - exe.run([], 'fetched_var') - exe.run([loss.name], 'fetched_var') - last_loss = numpy.array(fluid.global_scope().find_var('fetched_var') - .get_lod_tensor_array()[0]) - - print first_loss, last_loss - self.assertGreater(first_loss[0], last_loss[0]) + print first_loss + # + # for i in xrange(10): + # exe.run([], 'fetched_var') + # exe.run([loss.name], 'fetched_var') + # last_loss = numpy.array(fluid.global_scope().find_var('fetched_var') + # .get_lod_tensor_array()[0]) + # + # print first_loss, last_loss + # self.assertGreater(first_loss[0], last_loss[0]) -- GitLab