From 068502f07cfd01b19f29b5248a9efc4bd3309b01 Mon Sep 17 00:00:00 2001 From: "Francisco J. H. Heras" Date: Wed, 9 Dec 2020 19:13:13 +0000 Subject: [PATCH] Loss format from .3f to .3g in the tqdm (#4972) Co-authored-by: Jirka Borovec --- pytorch_lightning/core/lightning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/core/lightning.py b/pytorch_lightning/core/lightning.py index 5acec2b867..f66055bcca 100644 --- a/pytorch_lightning/core/lightning.py +++ b/pytorch_lightning/core/lightning.py @@ -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