Update logging.py (#602)

This commit is contained in:
ctlaltdefeat 2019-12-07 17:12:33 +02:00 committed by William Falcon
parent 2f01c03b38
commit 58cc6e13b9
1 changed files with 2 additions and 1 deletions

View File

@ -87,6 +87,7 @@ class TrainerLoggingMixin(ABC):
callback_metrics = self.reduce_distributed_output(callback_metrics, num_gpus)
for k, v in callback_metrics.items():
if isinstance(v, torch.Tensor):
callback_metrics[k] = v.item()
# ---------------