“1ee9037fce5651b0fdea60f30f733c3bb9962c06”上不存在“develop/doc/howto/deep_model/rnn/rnn_config_en.html”
提交 40c68724 编写于 作者: G guosheng

Refine the training output in Transformer by following comments

上级 70f9601b
...@@ -177,7 +177,7 @@ def main(): ...@@ -177,7 +177,7 @@ def main():
fetch_list=[sum_cost, avg_cost], fetch_list=[sum_cost, avg_cost],
use_program_cache=True) use_program_cache=True)
sum_cost_val, avg_cost_val = np.array(outs[0]), np.array(outs[1]) 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, (pass_id, batch_id, sum_cost_val, avg_cost_val,
np.exp([min(avg_cost_val[0], 100)]))) np.exp([min(avg_cost_val[0], 100)])))
# Validate and save the model for inference. # Validate and save the model for inference.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册