Commit 32c83fea authored by Yuxin Wu's avatar Yuxin Wu

[Keras] summarize total loss (fix #634)

parent 5b7d5106
......@@ -141,8 +141,8 @@ def setup_keras_trainer(
total_loss = tf.add_n(loss_tensors + [loss_reg], name=TOTAL_LOSS_NAME)
add_moving_summary(loss_reg, total_loss, *loss_tensors)
else:
add_moving_summary(*loss_tensors)
total_loss = tf.add_n(loss_tensors, name=TOTAL_LOSS_NAME)
add_moving_summary(total_loss, *loss_tensors)
if metrics and (ctx.is_main_training_tower or not ctx.is_training):
# for list: one metric for each output
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment