This commit is contained in:
Glenn Jocher 2020-03-13 16:08:49 -07:00
parent f30a8706e5
commit 208b9a73fe
1 changed files with 3 additions and 1 deletions

View File

@ -240,12 +240,14 @@ def train():
# Hyperparameter Burn-in
n_burn = 200 # number of burn-in batches
if ni <= n_burn:
# g = ni / n_burn # gain
# g = (ni / n_burn) ** 2 # gain
for x in model.named_modules(): # initial stats may be poor, wait to track
if x[0].endswith('BatchNorm2d'):
x[1].track_running_stats = ni == n_burn
# for x in optimizer.param_groups:
# x['lr'] = x['initial_lr'] * lf(epoch) * g # gain rises from 0 - 1
# if 'momentum' in x:
# x['momentum'] = hyp['momentum'] * g
# Plot images with bounding boxes
if ni < 1: