From a9a772a53c35974278c491c7fc6ea533a2deaafa Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 30 Jul 2021 01:35:32 +0200 Subject: [PATCH] Fix weight decay comment --- train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index 250342acff18..cf50a5d553e3 100644 --- a/train.py +++ b/train.py @@ -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: