From 95bc4736f3f42d584bd627054b8e7ca2456b038f Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 10 Sep 2019 13:17:05 +0200 Subject: [PATCH] updates --- utils/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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