set the initial color right

pull/10/head
erogol 2020-05-23 14:47:32 +02:00
parent b5f61d81c0
commit 0333483617
1 changed files with 2 additions and 2 deletions

View File

@ -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)
print(log_text, flush=True)