This commit is contained in:
Glenn Jocher 2019-11-14 17:22:09 -08:00
parent fedc2150b3
commit 9daa5e858a
1 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ def train():
best_fitness = float('inf') best_fitness = float('inf')
attempt_download(weights) attempt_download(weights)
if weights.endswith('.pt'): # pytorch format if weights.endswith('.pt'): # pytorch format
# possible weights are 'last.pt', 'yolov3-spp.pt', 'yolov3-tiny.pt' etc. # possible weights are '*.pt', 'yolov3-spp.pt', 'yolov3-tiny.pt' etc.
if opt.bucket: if opt.bucket:
os.system('gsutil cp gs://%s/last.pt %s' % (opt.bucket, last)) # download from bucket os.system('gsutil cp gs://%s/last.pt %s' % (opt.bucket, last)) # download from bucket
chkpt = torch.load(weights, map_location=device) chkpt = torch.load(weights, map_location=device)
@ -129,7 +129,7 @@ def train():
del chkpt del chkpt
elif len(weights) > 0: # darknet format elif len(weights) > 0: # darknet format
# possible weights are 'yolov3.weights', 'yolov3-tiny.conv.15', 'darknet53.conv.74' etc. # possible weights are '*.weights', 'yolov3-tiny.conv.15', 'darknet53.conv.74' etc.
cutoff = load_darknet_weights(model, weights) cutoff = load_darknet_weights(model, weights)
if opt.transfer or opt.prebias: # transfer learning edge (yolo) layers if opt.transfer or opt.prebias: # transfer learning edge (yolo) layers