Skip to content

Commit

Permalink
Fix addcmul_
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-c committed May 15, 2020
1 parent fc2a4c8 commit 3e0f062
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def step(self, closure=None):
# Decay the first and second moment running average coefficient
# In-place operations to update the averages at the same time
exp_avg.mul_(beta1).add_(grad, alpha=1.0 - beta1)
exp_avg_sq.mul_(beta2).addcmul_(grad, grad, 1.0 - beta2)
exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=1.0 - beta2)
denom = exp_avg_sq.sqrt().add_(group["eps"])

step_size = group["lr"]
Expand Down

0 comments on commit 3e0f062

Please sign in to comment.