Round seconds to two decimals

This commit is contained in:
thllwg committed 2020-07-13 19:02:17 +02:00
1 parent 1267e77846
commit b87a7ac356
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -56,7 +56,7 @@ class ConsoleLogger():
def print_train_epoch_end(self, global_step, epoch, epoch_time,
print_dict):
indent = " | > "
log_text = f"\n{tcolors.BOLD} --> TRAIN PERFORMACE -- EPOCH TIME: {epoch_time} sec -- GLOBAL_STEP: {global_step}{tcolors.ENDC}\n"
log_text = f"\n{tcolors.BOLD} --> TRAIN PERFORMACE -- EPOCH TIME: {epoch_time:.2f} sec -- GLOBAL_STEP: {global_step}{tcolors.ENDC}\n"
for key, value in print_dict.items():
log_text += "{}{}: {:.5f}\n".format(indent, key, value)
print(log_text, flush=True)