weight_decay fix

This commit is contained in:
Glenn Jocher 2019-08-28 16:50:34 +02:00
parent 93b72d059e
commit 85a24dbc7e
1 changed files with 2 additions and 1 deletions

View File

@ -173,7 +173,7 @@ def train():
hyp=hyp, # augmentation hyperparameters
rect=opt.rect, # rectangular training
image_weights=opt.img_weights,
cache_images=opt.cache_images)
cache_images=False if opt.prebias else opt.cache_images)
# Dataloader
dataloader = torch.utils.data.DataLoader(dataset,
@ -197,6 +197,7 @@ def train():
maps = np.zeros(nc) # mAP per class
results = (0, 0, 0, 0, 0, 0, 0) # 'P', 'R', 'mAP', 'F1', 'val GIoU', 'val Objectness', 'val Classification'
t0 = time.time()
print('Starting %s for %g epochs...' % ('prebias' if opt.prebias else 'training', epochs))
for epoch in range(start_epoch, epochs): # epoch ------------------------------------------------------------------
model.train()
print(('\n' + '%10s' * 8) % ('Epoch', 'gpu_mem', 'GIoU', 'obj', 'cls', 'total', 'targets', 'img_size'))