train:调整训练日志输出频率
- 将训练日志的输出频率从每100 个批次调整为每个批次 - 此修改可以提供更频繁的训练进度反馈,便于实时监控训练状态
This commit is contained in:
parent
b6486dbaf4
commit
f4b3a933bf
2
train.py
2
train.py
@ -222,7 +222,7 @@ for epoch in range(num_epochs):
|
|||||||
time_left = datetime.timedelta(seconds=batches_left * (time.time() - prev_time))
|
time_left = datetime.timedelta(seconds=batches_left * (time.time() - prev_time))
|
||||||
epoch_time = time.time() - prev_time
|
epoch_time = time.time() - prev_time
|
||||||
prev_time = time.time()
|
prev_time = time.time()
|
||||||
if i % 100 == 0:
|
if i % 1 == 0:
|
||||||
sys.stdout.write(
|
sys.stdout.write(
|
||||||
"\r[Epoch %d/%d] [Batch %d/%d] [loss: %f] ETA: %.10s"
|
"\r[Epoch %d/%d] [Batch %d/%d] [loss: %f] ETA: %.10s"
|
||||||
% (
|
% (
|
||||||
|
Loading…
Reference in New Issue
Block a user