Optimizer group report
This commit is contained in:
parent
d62d68929c
commit
f1d73a29e5
1
train.py
1
train.py
|
@ -108,6 +108,7 @@ def train():
|
||||||
optimizer = optim.SGD(pg0, lr=hyp['lr0'], momentum=hyp['momentum'], nesterov=True)
|
optimizer = optim.SGD(pg0, lr=hyp['lr0'], momentum=hyp['momentum'], nesterov=True)
|
||||||
optimizer.add_param_group({'params': pg1, 'weight_decay': hyp['weight_decay']}) # add pg1 with weight_decay
|
optimizer.add_param_group({'params': pg1, 'weight_decay': hyp['weight_decay']}) # add pg1 with weight_decay
|
||||||
optimizer.add_param_group({'params': pg2}) # add pg2 (biases)
|
optimizer.add_param_group({'params': pg2}) # add pg2 (biases)
|
||||||
|
print('Optimizer groups: %g .bias, %g Conv2d.weight, %g other' % (len(pg2), len(pg1), len(pg0)))
|
||||||
del pg0, pg1, pg2
|
del pg0, pg1, pg2
|
||||||
|
|
||||||
start_epoch = 0
|
start_epoch = 0
|
||||||
|
|
Loading…
Reference in New Issue