updates
This commit is contained in:
parent
3f6df0fb28
commit
17cf9f4a07
12
train.py
12
train.py
|
@ -397,6 +397,12 @@ if __name__ == '__main__':
|
||||||
device = torch_utils.select_device(opt.device, apex=mixed_precision)
|
device = torch_utils.select_device(opt.device, apex=mixed_precision)
|
||||||
|
|
||||||
tb_writer = None
|
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
|
if not opt.evolve: # Train normally
|
||||||
try:
|
try:
|
||||||
# Start Tensorboard with "tensorboard --logdir=runs", view at http://localhost:6006/
|
# Start Tensorboard with "tensorboard --logdir=runs", view at http://localhost:6006/
|
||||||
|
@ -406,12 +412,6 @@ if __name__ == '__main__':
|
||||||
except:
|
except:
|
||||||
pass
|
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
|
train() # train normally
|
||||||
|
|
||||||
else: # Evolve hyperparameters (optional)
|
else: # Evolve hyperparameters (optional)
|
||||||
|
|
Loading…
Reference in New Issue