Fix addcmul_
This commit is contained in:
@@ -153,7 +153,7 @@ class AdamW(Optimizer):
|
|||||||
# Decay the first and second moment running average coefficient
|
# Decay the first and second moment running average coefficient
|
||||||
# In-place operations to update the averages at the same time
|
# In-place operations to update the averages at the same time
|
||||||
exp_avg.mul_(beta1).add_(grad, alpha=1.0 - beta1)
|
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"])
|
denom = exp_avg_sq.sqrt().add_(group["eps"])
|
||||||
|
|
||||||
step_size = group["lr"]
|
step_size = group["lr"]
|
||||||
|
|||||||
Reference in New Issue
Block a user