weight_decay fix
This commit is contained in:
parent
93b72d059e
commit
85a24dbc7e
3
train.py
3
train.py
|
@ -173,7 +173,7 @@ def train():
|
||||||
hyp=hyp, # augmentation hyperparameters
|
hyp=hyp, # augmentation hyperparameters
|
||||||
rect=opt.rect, # rectangular training
|
rect=opt.rect, # rectangular training
|
||||||
image_weights=opt.img_weights,
|
image_weights=opt.img_weights,
|
||||||
cache_images=opt.cache_images)
|
cache_images=False if opt.prebias else opt.cache_images)
|
||||||
|
|
||||||
# Dataloader
|
# Dataloader
|
||||||
dataloader = torch.utils.data.DataLoader(dataset,
|
dataloader = torch.utils.data.DataLoader(dataset,
|
||||||
|
@ -197,6 +197,7 @@ def train():
|
||||||
maps = np.zeros(nc) # mAP per class
|
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'
|
results = (0, 0, 0, 0, 0, 0, 0) # 'P', 'R', 'mAP', 'F1', 'val GIoU', 'val Objectness', 'val Classification'
|
||||||
t0 = time.time()
|
t0 = time.time()
|
||||||
|
print('Starting %s for %g epochs...' % ('prebias' if opt.prebias else 'training', epochs))
|
||||||
for epoch in range(start_epoch, epochs): # epoch ------------------------------------------------------------------
|
for epoch in range(start_epoch, epochs): # epoch ------------------------------------------------------------------
|
||||||
model.train()
|
model.train()
|
||||||
print(('\n' + '%10s' * 8) % ('Epoch', 'gpu_mem', 'GIoU', 'obj', 'cls', 'total', 'targets', 'img_size'))
|
print(('\n' + '%10s' * 8) % ('Epoch', 'gpu_mem', 'GIoU', 'obj', 'cls', 'total', 'targets', 'img_size'))
|
||||||
|
|
Loading…
Reference in New Issue