push fix to training

This commit is contained in:
thomwolf committed 2019-09-25 17:33:16 +02:00
1 parent 5def3302f4
commit a049c8043b
6 files changed
+75 -4

No files matched your search

+1 -1
View File
@@ -154,8 +154,8 @@ def train(args, train_dataset, model, tokenizer):
tr_loss += loss.item()
if (step + 1) % args.gradient_accumulation_steps == 0:
scheduler.step() # Update learning rate schedule
optimizer.step()
scheduler.step() # Update learning rate schedule
model.zero_grad()
global_step += 1