Skip to content

Commit 6b7fb6c

Browse files
committed
update
1 parent 6d74454 commit 6b7fb6c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

train.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@ def trainModel(model, dataset, micro_batch_size, gradient_accumulation_steps, n_
9797
print(f'scheduler_step: {scheduler_step}')
9898

9999
steps = 0
100-
total_acc, total_acc_count, total_count, train_loss = 0, 0, 0, 0
101100
for epoch in range(int(n_epochs)):
101+
total_acc, total_acc_count, total_count, train_loss = 0, 0, 0, 0
102+
102103
# 自定义的dataloader
103104
random.shuffle(indexes) # 打乱顺序
104105
end = len(indexes) + 1

0 commit comments

Comments
 (0)