This commit is contained in:
Glenn Jocher 2020-03-11 14:50:50 -07:00
parent 320f9c6601
commit 4089735c5e
1 changed files with 3 additions and 8 deletions

View File

@ -238,15 +238,10 @@ def train():
targets = targets.to(device) targets = targets.to(device)
# Hyperparameter burn-in # Hyperparameter burn-in
# n_burn = nb - 1 # min(nb // 5 + 1, 1000) # number of burn-in batches # n_burn = 100 # number of burn-in batches
# if ni <= n_burn: # if ni < n_burn:
# for m in model.named_modules():
# if m[0].endswith('BatchNorm2d'):
# m[1].momentum = 1 - i / n_burn * 0.99 # BatchNorm2d momentum falls from 1 - 0.01
# g = (i / n_burn) ** 4 # gain rises from 0 - 1
# for x in optimizer.param_groups: # for x in optimizer.param_groups:
# x['lr'] = hyp['lr0'] * g # x['lr'] = x['initial_lr'] * (ni / n_burn) ** 4 # gain rises from 0 - 1
# x['weight_decay'] = hyp['weight_decay'] * g
# Plot images with bounding boxes # Plot images with bounding boxes
if ni < 1: if ni < 1: