Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Glenn Jocher 2019-09-02 14:28:13 +02:00
parent ea61b46b31
commit 2877ac9286
1 changed files with 2 additions and 1 deletions

View File

@ -123,7 +123,8 @@ def train():
for p in optimizer.param_groups: for p in optimizer.param_groups:
# lower param count allows more aggressive training settings: i.e. SGD ~0.1 lr0, ~0.9 momentum # lower param count allows more aggressive training settings: i.e. SGD ~0.1 lr0, ~0.9 momentum
p['lr'] *= 100 p['lr'] *= 100
p['momentum'] *= 0.9 if p.get('momentum') is not None: # for SGD but not Adam
p['momentum'] *= 0.9
for p in model.parameters(): for p in model.parameters():
if opt.prebias and p.numel() == nf: # train (yolo biases) if opt.prebias and p.numel() == nf: # train (yolo biases)