From e774e916208000f293bc4bf73df47c04aea946c7 Mon Sep 17 00:00:00 2001 From: caozhou Date: Mon, 16 Nov 2020 19:51:35 +0800 Subject: [PATCH] modify print --- mindspore/train/callback/_time_monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mindspore/train/callback/_time_monitor.py b/mindspore/train/callback/_time_monitor.py index 4d3b13c7c8..f5a5815041 100644 --- a/mindspore/train/callback/_time_monitor.py +++ b/mindspore/train/callback/_time_monitor.py @@ -36,7 +36,7 @@ class TimeMonitor(Callback): self.epoch_time = time.time() def epoch_end(self, run_context): - epoch_seconds = time.time() - self.epoch_time + epoch_seconds = (time.time() - self.epoch_time) * 1000 step_size = self.data_size cb_params = run_context.original_args() if hasattr(cb_params, "batch_num"): @@ -49,4 +49,4 @@ class TimeMonitor(Callback): return step_seconds = epoch_seconds / step_size - print("Epoch time: {:5.3f}s, per step time: {:5.3f}s".format(epoch_seconds, step_seconds), flush=True) + print("Epoch time: {:5.3f}, per step time: {:5.3f}".format(epoch_seconds, step_seconds), flush=True)