This commit is contained in:
Glenn Jocher 2019-04-17 18:22:40 +02:00
parent ddab3802eb
commit 27ca52c9ee
1 changed files with 7 additions and 0 deletions

View File

@ -285,6 +285,13 @@ if __name__ == '__main__':
if opt.evolve: if opt.evolve:
best_fitness = results[2] # use mAP for fitness best_fitness = results[2] # use mAP for fitness
# Write mutation results
sr = '%11.3g' * 5 % results # results string (P, R, mAP, F1, test_loss)
sh = '%11.4g' * len(hyp) % tuple(hyp.values()) # hyp string
print('Evolved hyperparams: %s\nEvolved fitness: %s' % (sh, sr))
with open('evolve.txt', 'a') as f:
f.write(sr + sh + '\n')
gen = 30 # generations to evolve gen = 30 # generations to evolve
for _ in range(gen): for _ in range(gen):