Commit 4a05df34 authored by Tom Aarsen's avatar Tom Aarsen
Browse files

Fix critical bug in PytorchLARS().step: Undefined variable

parent f6978ae2
......@@ -181,7 +181,7 @@ class PytorchLARS(Optimizer):
state = self.state[p]
d_p = p.grad
if weight_decay != 0:
d_p = d_p.add(param, alpha=weight_decay)
d_p = d_p.add(p, alpha=weight_decay)
if momentum != 0:
buf = state.get("momentum_buffer", None)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment