optimize the log

pull/860/head
huangyuxin 3 years ago
parent 4b225b7602
commit 9c37d10992

@ -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