This commit is contained in:
Glenn Jocher 2019-09-11 23:11:01 +02:00
parent 7997be8bba
commit fb81559565
1 changed files with 2 additions and 2 deletions

View File

@ -327,7 +327,7 @@ def train():
best_fitness = fitness best_fitness = fitness
# Save training results # Save training results
save = (not opt.nosave) or ((not opt.evolve) and final_epoch) save = (not opt.nosave) or (final_epoch and not opt.evolve) or opt.prebias
if save: if save:
with open('results.txt', 'r') as file: with open('results.txt', 'r') as file:
# Create checkpoint # Create checkpoint
@ -340,7 +340,7 @@ def train():
# Save last checkpoint # Save last checkpoint
torch.save(chkpt, last) torch.save(chkpt, last)
if opt.bucket and not opt.evolve: if opt.bucket and not opt.prebias:
os.system('gsutil cp %s gs://%s' % (last, opt.bucket)) # upload to bucket os.system('gsutil cp %s gs://%s' % (last, opt.bucket)) # upload to bucket
# Save best checkpoint # Save best checkpoint