From cce87951480c56dc78ca957af93dad8ac5b9d7c7 Mon Sep 17 00:00:00 2001 From: Xi Chen Date: Tue, 23 Jan 2018 10:23:58 -0800 Subject: [PATCH] fix dist test: fit a line --- .../fluid/tests/book_distribute/notest_dist_fit_a_line.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/paddle/v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py b/python/paddle/v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py index 52c7ecdeb3..9774edebfb 100644 --- a/python/paddle/v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py +++ b/python/paddle/v2/fluid/tests/book_distribute/notest_dist_fit_a_line.py @@ -68,10 +68,10 @@ else: fluid.io.save_persistables(exe, "./fit_a_line.model/") fluid.io.load_persistables(exe, "./fit_a_line.model/") for data in train_reader(): - avg_loss_value, = exe.run(trainer_prog, - feed=feeder.feed(data), - fetch_list=[avg_cost]) - + avg_loss_value = exe.run(trainer_prog, + feed=feeder.feed(data), + fetch_list=[avg_cost]) + print("loss:" + str(avg_loss_value)) if avg_loss_value[0] < 10.0: exit(0) exit(1) -- GitLab