This commit is contained in:
Glenn Jocher 2019-07-22 02:18:34 +02:00
parent 3b108afac3
commit 1cfd370455
1 changed files with 3 additions and 2 deletions

View File

@ -235,9 +235,10 @@ def train(cfg,
# SGD burn-in # SGD burn-in
if epoch == 0 and i <= n_burnin: if epoch == 0 and i <= n_burnin:
lr = hyp['lr0'] * (i / n_burnin) ** 4 g = (i / n_burnin) ** 4 # gain
for x in optimizer.param_groups: for x in optimizer.param_groups:
x['lr'] = lr x['lr'] = hyp['lr0'] * g
x['weight_decay'] = hyp['weight_decay'] * g
# Run model # Run model
pred = model(imgs) pred = model(imgs)