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.
2 parents 2d4b7e7 + cdcd0a9 commit 7f73252Copy full SHA for 7f73252
timm/optim/lars.py
@@ -114,7 +114,7 @@ def step(self, closure=None):
114
)
115
if group['trust_clip']:
116
trust_ratio = torch.minimum(trust_ratio / group['lr'], one_tensor)
117
- grad.add(p, alpha=weight_decay)
+ grad.add_(p, alpha=weight_decay)
118
grad.mul_(trust_ratio)
119
120
# apply SGD update https://github.com/pytorch/pytorch/blob/1.7/torch/optim/sgd.py#L100
0 commit comments