diff --git a/utils/utils.py b/utils/utils.py index a28ed5b3..0202b8f5 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -674,7 +674,7 @@ def kmeans_targets(path='../coco/trainvalno5k.txt', n=9, img_size=416): # from def print_mutation(hyp, results, bucket=''): # Print mutation results to evolve.txt (for use with train.py --evolve) a = '%10s' * len(hyp) % tuple(hyp.keys()) # hyperparam keys - b = '%10.5g' * len(hyp) % tuple(hyp.values()) # hyperparam values + b = '%10.3g' * len(hyp) % tuple(hyp.values()) # hyperparam values c = '%10.3g' * len(results) % results # results (P, R, mAP, F1, test_loss) print('\n%s\n%s\nEvolved fitness: %s\n' % (a, b, c)) @@ -684,7 +684,7 @@ def print_mutation(hyp, results, bucket=''): with open('evolve.txt', 'a') as f: # append result f.write(c + b + '\n') x = np.unique(np.loadtxt('evolve.txt', ndmin=2), axis=0) # load unique rows - np.savetxt('evolve.txt', x[np.argsort(-fitness(x))], '%10.5g') # save sort by fitness + np.savetxt('evolve.txt', x[np.argsort(-fitness(x))], '%10.3g') # save sort by fitness if bucket: os.system('gsutil cp evolve.txt gs://%s' % bucket) # upload evolve.txt