From 0333483617953bd105d68032c5d03b5819270e7f Mon Sep 17 00:00:00 2001 From: erogol Date: Sat, 23 May 2020 14:47:32 +0200 Subject: [PATCH] set the initial color right --- utils/console_logger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/console_logger.py b/utils/console_logger.py index 5c6ec75f..0b361bb8 100644 --- a/utils/console_logger.py +++ b/utils/console_logger.py @@ -87,9 +87,9 @@ class ConsoleLogger(): diff = 0 if self.old_eval_loss_dict is not None: diff = value - self.old_eval_loss_dict[key] - if diff < 0: + if diff <= 0: color = tcolors.OKGREEN sign = '' log_text += "{}{}:{} {:.5f} {}({}{:.5f})\n".format(indent, key, color, value, tcolors.ENDC, sign, diff) self.old_eval_loss_dict = avg_loss_dict - print(log_text, flush=True) \ No newline at end of file + print(log_text, flush=True)