减少训练过程中的输出频率
修改了训练脚本,将训练过程中的进度输出频率从每批输出改为每100批输出一次,以减少输出量,提高训练效率。
This commit is contained in:
parent
87fa4dfcc6
commit
d65f6ec3ce
2
train.py
2
train.py
@ -222,6 +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 step % 100 == 0:
|
||||
sys.stdout.write(
|
||||
"\r[Epoch %d/%d] [Batch %d/%d] [loss: %f] ETA: %.10s"
|
||||
% (
|
||||
@ -234,6 +235,7 @@ for epoch in range(num_epochs):
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
# adjust the learning rate
|
||||
|
||||
scheduler1.step()
|
||||
|
Loading…
Reference in New Issue
Block a user