From 49822d3234cb67e4996ad13fdbc3c44e1a0bbf29 Mon Sep 17 00:00:00 2001 From: Jordan Gong Date: Sun, 21 Aug 2022 17:28:07 +0800 Subject: Some modifications for PosRecon trainer --- libs/logging.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs/logging.py') diff --git a/libs/logging.py b/libs/logging.py index 3969ffa..6dfe5f9 100644 --- a/libs/logging.py +++ b/libs/logging.py @@ -113,7 +113,8 @@ def tensorboard_logger(function): for metric_name, metric_value in metrics.__dict__.items(): if metric_name not in metrics_exclude: if isinstance(metric_value, float): - logger.add_scalar(metric_name, metric_value, global_step + 1) + logger.add_scalar(metric_name.replace('_', '/', 1), + metric_value, global_step + 1) else: NotImplementedError(f"Unsupported type: '{type(metric_value)}'") return loggers, metrics -- cgit v1.2.3