Unverified Commit 8d3c3ef4 authored by Glenn Jocher's avatar Glenn Jocher Committed by GitHub
Browse files

Fix weight decay comment (#4228)

parent 1a10b0ec
......@@ -128,9 +128,9 @@ def train(hyp, # path/to/hyp.yaml or hyp dictionary
for v in model.modules():
if hasattr(v, 'bias') and isinstance(v.bias, nn.Parameter): # bias
g2.append(v.bias)
if isinstance(v, nn.BatchNorm2d): # weight with decay
if isinstance(v, nn.BatchNorm2d): # weight (no decay)
g0.append(v.weight)
elif hasattr(v, 'weight') and isinstance(v.weight, nn.Parameter): # weight without decay
elif hasattr(v, 'weight') and isinstance(v.weight, nn.Parameter): # weight (with decay)
g1.append(v.weight)
if opt.adam:
......
Supports Markdown
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