optimize the log

pull/1091/head
huangyuxin 4 years ago
parent ae6144fd5a
commit 0ee4ee56e5

@ -216,6 +216,7 @@ class U2Trainer(Trainer):
msg += f"{v:>.8f}" if isinstance(v,
float) else f"{v}"
msg += ","
msg = msg[:-1] # remove the last ","
if (batch_index + 1
) % self.config.training.log_interval == 0:
logger.info(msg)

@ -263,6 +263,7 @@ class Trainer():
msg += f"{v:>.8f}" if isinstance(v,
float) else f"{v}"
msg += ","
msg = msg[:-1] # remove the last ","
logger.info(msg)
data_start_time = time.time()
except Exception as e:

Loading…
Cancel
Save