Skip to content

Commit 19c2136

Browse files
committed
refactor: weight_decay
1 parent cfb96f3 commit 19c2136

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch_optimizer/optimizer/ralamb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def step(self, closure: CLOSURE = None) -> LOSS:
173173

174174
buffered[2] = step_size
175175

176-
if group['weight_decay'] != 0:
176+
if group['weight_decay'] > 0.0:
177177
p_fp32.add_(p_fp32, alpha=-group['weight_decay'] * group['lr'])
178178

179179
radam_step = p_fp32.clone()

0 commit comments

Comments
 (0)