This commit is contained in:
Glenn Jocher 2019-12-27 13:04:46 -08:00
parent 4843cc4e08
commit 162ddcf6c7
1 changed files with 3 additions and 3 deletions

View File

@ -403,15 +403,15 @@ def train():
def prebias(): def prebias():
# trains output bias layers for 1 epoch and creates new backbone # trains output bias layers for 1 epoch and creates new backbone
if opt.prebias: if opt.prebias:
a = opt.img_weights # save settings # opt_0 = opt # save settings
opt.img_weights = False # disable settings # opt.rect = False # update settings (if any)
train() # transfer-learn yolo biases for 1 epoch train() # transfer-learn yolo biases for 1 epoch
create_backbone(last) # saved results as backbone.pt create_backbone(last) # saved results as backbone.pt
# opt = opt_0 # reset settings
opt.weights = wdir + 'backbone.pt' # assign backbone opt.weights = wdir + 'backbone.pt' # assign backbone
opt.prebias = False # disable prebias opt.prebias = False # disable prebias
opt.img_weights = a # reset settings
if __name__ == '__main__': if __name__ == '__main__':