From 85a24dbc7efbade38c49c4829a4b5e225f449a49 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 28 Aug 2019 16:50:34 +0200 Subject: [PATCH] weight_decay fix --- train.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/train.py b/train.py index 01a0eeee..c005480a 100644 --- a/train.py +++ b/train.py @@ -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'))