This commit is contained in:
Glenn Jocher 2019-11-14 17:25:29 -08:00
parent 9daa5e858a
commit 985006a52a
1 changed files with 1 additions and 1 deletions

View File

@ -366,7 +366,7 @@ def train():
# end training # end training
if len(opt.name) and not opt.prebias: if len(opt.name) and not opt.prebias:
os.rename('results.txt', 'results_%s.txt' % opt.name) os.rename('results.txt', 'results_%s.txt' % opt.name)
os.rename(wdir + 'last.pt', wdir + 'last_%s.pt' % opt.name) os.rename(wdir + 'last.pt', wdir + 'last_%s.pt' % opt.name) if os.path.exists(wdir + 'last.pt') else None
os.rename(wdir + 'best.pt', wdir + 'best_%s.pt' % opt.name) if os.path.exists(wdir + 'best.pt') else None os.rename(wdir + 'best.pt', wdir + 'best_%s.pt' % opt.name) if os.path.exists(wdir + 'best.pt') else None
plot_results() # save as results.png plot_results() # save as results.png
print('%g epochs completed in %.3f hours.\n' % (epoch - start_epoch + 1, (time.time() - t0) / 3600)) print('%g epochs completed in %.3f hours.\n' % (epoch - start_epoch + 1, (time.time() - t0) / 3600))