Commit d07a58f3 authored by Georgy Marrero's avatar Georgy Marrero Committed by Facebook GitHub Bot
Browse files

Log total_loss during training

Summary: This diff adds the sum of all the losses as `total_loss` and logs it.

Reviewed By: kazhang

Differential Revision: D31063260

fbshipit-source-id: 3012dd49dd8f5fc60a7c32f3ad7a3477d2b6f5a0
parent 80b6098f
......@@ -168,6 +168,7 @@ class DefaultTask(pl.LightningModule):
def training_step(self, batch, batch_idx):
loss_dict = self.forward(batch)
losses = sum(loss_dict.values())
loss_dict["total_loss"] = losses
self.storage.step()
self.log_dict(loss_dict, prog_bar=True)
......
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