This commit is contained in:
Glenn Jocher 2019-10-16 01:36:13 +02:00
parent 0be5e4132d
commit d23ada04dc
1 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ def train():
cutoff = -1 # backbone reaches to cutoff layer
start_epoch = 0
best_fitness = 0.
best_fitness = float('inf')
attempt_download(weights)
if weights.endswith('.pt'): # pytorch format
# possible weights are 'last.pt', 'yolov3-spp.pt', 'yolov3-tiny.pt' etc.
@ -329,8 +329,8 @@ def train():
tb_writer.add_scalar(title, xi, epoch)
# Update best mAP
fitness = results[2] # mAP
if fitness > best_fitness:
fitness = sum(results[4:]) # total loss
if fitness < best_fitness:
best_fitness = fitness
# Save training results