diff --git a/pytorch_lightning/loggers/tensorboard.py b/pytorch_lightning/loggers/tensorboard.py index fc33c9e942..90e24624a3 100644 --- a/pytorch_lightning/loggers/tensorboard.py +++ b/pytorch_lightning/loggers/tensorboard.py @@ -115,6 +115,7 @@ class TensorBoardLogger(LightningLoggerBase): ) else: from torch.utils.tensorboard.summary import hparams + if metrics is None: metrics = {} exp, ssi, sei = hparams(sanitized_params, metrics) @@ -123,6 +124,10 @@ class TensorBoardLogger(LightningLoggerBase): writer.add_summary(ssi) writer.add_summary(sei) + if metrics: + # necessary for hparam comparison with metrics + self.log_metrics(metrics) + # some alternative should be added self.tags.update(sanitized_params)