From 40c687248b9f799d9abd828192de4502f1042f20 Mon Sep 17 00:00:00 2001 From: guosheng Date: Wed, 4 Apr 2018 17:07:44 +0800 Subject: [PATCH] Refine the training output in Transformer by following comments --- fluid/neural_machine_translation/transformer/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fluid/neural_machine_translation/transformer/train.py b/fluid/neural_machine_translation/transformer/train.py index ece6cb12..e267f209 100644 --- a/fluid/neural_machine_translation/transformer/train.py +++ b/fluid/neural_machine_translation/transformer/train.py @@ -177,7 +177,7 @@ def main(): fetch_list=[sum_cost, avg_cost], use_program_cache=True) sum_cost_val, avg_cost_val = np.array(outs[0]), np.array(outs[1]) - print("epoch: %d, batch: %d, sum loss: %f, avg loss: %f, ppl: %f" % + print("epoch: %d, batch: %d, sum loss: %f, avg loss: %f, ppl: %f" % (pass_id, batch_id, sum_cost_val, avg_cost_val, np.exp([min(avg_cost_val[0], 100)]))) # Validate and save the model for inference. -- GitLab