Skip to content

Commit 49f3602

Browse files
committed
refactor: RAdam
1 parent a559f0d commit 49f3602

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch_optimizer/radam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def step(self, closure: CLOSURE = None) -> LOSS:
123123
exp_avg.mul_(beta1).add_(grad, alpha=1.0 - beta1)
124124
exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=1.0 - beta2)
125125

126-
buffered = group['buffer'][int(state['step'] % 10)]
126+
buffered = group['buffer'][state['step'] % 10]
127127
if state['step'] == buffered[0]:
128128
n_sma, step_size = buffered[1], buffered[2]
129129
else:

0 commit comments

Comments
 (0)