train:调整训练日志输出频率

- 将训练日志的输出频率从每100 个批次调整为每个批次
- 此修改可以提供更频繁的训练进度反馈,便于实时监控训练状态
This commit is contained in:
zjut 2024-10-26 19:04:12 +08:00
parent b6486dbaf4
commit f4b3a933bf

View File

@ -222,7 +222,7 @@ for epoch in range(num_epochs):
time_left = datetime.timedelta(seconds=batches_left * (time.time() - prev_time))
epoch_time = time.time() - prev_time
prev_time = time.time()
if i % 100 == 0:
if i % 1 == 0:
sys.stdout.write(
"\r[Epoch %d/%d] [Batch %d/%d] [loss: %f] ETA: %.10s"
% (