Skip to content

Commit

Permalink
fix type trainer
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickvonplaten committed Apr 30, 2020
1 parent 1b8951f commit 0335001
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/transformers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,10 @@ def get_optimizers(
"weight_decay": 0.0,
},
]
optimizer = AdamW(optimizer_grouped_parameters, lr=self.args.learning_rate, eps=self.args.adam_epsilon, betas=(self.args.adam_beta_1, self.args.adam_beta_2))
optimizer = AdamW(optimizer_grouped_parameters, lr=self.args.learning_rate, eps=self.args.adam_epsilon)
scheduler = get_linear_schedule_with_warmup(
optimizer, num_warmup_steps=self.args.warmup_steps, num_training_steps=num_training_steps
)

return optimizer, scheduler

def train(self, model_path: Optional[str] = None):
Expand Down

0 comments on commit 0335001

Please sign in to comment.