From 9f7e71acab69219d8df1fde4d8ddc0434cd888ba Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 21 Jul 2019 03:48:57 +0200 Subject: [PATCH] updates --- train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index 1258dda9..cdafcc13 100644 --- a/train.py +++ b/train.py @@ -327,8 +327,8 @@ def print_mutation(hyp, results): os.system('gsutil cp gs://%s/evolve.txt .' % opt.bucket) # download evolve.txt with open('evolve.txt', 'a') as f: # append result f.write(c + b + '\n') - x = np.loadtxt('evolve.txt', ndmin=2) - np.savetxt('evolve.txt', x[np.argsort(-fitness(x))], '%11.3g') # save sorted by fitness + x = np.unique(np.loadtxt('evolve.txt', ndmin=2), axis=0) # load unique rows + np.savetxt('evolve2.txt', x[np.argsort(-fitness(x))] , '%11.3g') # save sort by fitness os.system('gsutil cp evolve.txt gs://%s' % opt.bucket) # upload evolve.txt else: with open('evolve.txt', 'a') as f: