This commit is contained in:
Glenn Jocher 2019-09-11 22:21:39 +02:00
parent 3f6df0fb28
commit 17cf9f4a07
1 changed files with 6 additions and 6 deletions

View File

@ -397,6 +397,12 @@ if __name__ == '__main__':
device = torch_utils.select_device(opt.device, apex=mixed_precision)
tb_writer = None
if opt.prebias:
train() # transfer-learn yolo biases for 1 epoch
create_backbone('weights/last.pt') # saved results as backbone.pt
opt.weights = 'weights/backbone.pt' # assign backbone
opt.prebias = False # disable prebias
if not opt.evolve: # Train normally
try:
# Start Tensorboard with "tensorboard --logdir=runs", view at http://localhost:6006/
@ -406,12 +412,6 @@ if __name__ == '__main__':
except:
pass
if opt.prebias:
train() # transfer-learn yolo biases for 1 epoch
create_backbone('weights/last.pt') # saved results as backbone.pt
opt.weights = 'weights/backbone.pt' # assign backbone
opt.prebias = False # disable prebias
train() # train normally
else: # Evolve hyperparameters (optional)