Loss format from .3f to .3g in the tqdm (#4972)

Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
This commit is contained in:
Francisco J. H. Heras 2020-12-09 19:13:13 +00:00 committed by GitHub
parent bcbba3b702
commit 068502f07c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1397,7 +1397,7 @@ class LightningModule(
if running_train_loss is not None
else float("NaN")
)
tqdm_dict = {"loss": "{:.3f}".format(avg_training_loss)}
tqdm_dict = {"loss": "{:.3g}".format(avg_training_loss)}
if self.trainer.truncated_bptt_steps is not None:
tqdm_dict["split_idx"] = self.trainer.split_idx