We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f925ec7 commit a3f197eCopy full SHA for a3f197e
pytorch_optimizer/optimizer/ranger21.py
@@ -276,9 +276,8 @@ def step(self, closure: CLOSURE = None) -> LOSS:
276
grad_ma, neg_grad_ma = state['neg_grad_ma'], state['grad_ma']
277
278
variance_ma = state['variance_ma']
279
- max_variance_ma = state['max_variance_ma']
280
281
- torch.max(max_variance_ma, variance_ma, out=variance_ma)
+ torch.max(state['max_variance_ma'], variance_ma, out=variance_ma)
282
de_nom = (variance_ma.sqrt() / bias_correction2_sq).add_(group['eps'])
283
284
grad = p.grad
0 commit comments