提交 389ea18a 编写于 作者: Y Yu Yang

Debug code

上级 e18a2697
......@@ -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])
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册