You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
step=_get_value(step_t)
bias_correction1=1-beta1**stepbias_correction2=1-beta2**stepstep_size=lr/bias_correction1bias_correction2_sqrt=bias_correction2**0.5ifamsgrad:
# Maintains the maximum of all 2nd moment running avg. till nowtorch.maximum(max_exp_avg_sqs[i], exp_avg_sq, out=max_exp_avg_sqs[i])
# Use the max. for normalizing running avg. of gradientdenom= (max_exp_avg_sqs[i].sqrt() /bias_correction2_sqrt).add_(eps)
else:
denom= (exp_avg_sq.sqrt() /bias_correction2_sqrt).add_(eps)
param.addcdiv_(exp_avg, denom, value=-step_size)
The text was updated successfully, but these errors were encountered:
transformers/src/transformers/optimization.py
Line 648 in e5fd865
It does correction after epsilon is added, whereas pytorch:
https://pytorch.org/docs/stable/_modules/torch/optim/adamw.html#AdamW
The text was updated successfully, but these errors were encountered: