From f4b3a933bf4febe4f89657d9c9aa09556119b4c0 Mon Sep 17 00:00:00 2001 From: zjut Date: Sat, 26 Oct 2024 19:04:12 +0800 Subject: [PATCH] =?UTF-8?q?train:=E8=B0=83=E6=95=B4=E8=AE=AD=E7=BB=83?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA=E9=A2=91=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将训练日志的输出频率从每100 个批次调整为每个批次 - 此修改可以提供更频繁的训练进度反馈,便于实时监控训练状态 --- train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/train.py b/train.py index 501045e..81d4d00 100644 --- a/train.py +++ b/train.py @@ -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" % (