updates
This commit is contained in:
parent
20e381edb4
commit
6ccf19038d
7
train.py
7
train.py
|
@ -365,8 +365,8 @@ def train():
|
||||||
torch.save(chkpt, best)
|
torch.save(chkpt, best)
|
||||||
|
|
||||||
# Save backup every 10 epochs (optional)
|
# Save backup every 10 epochs (optional)
|
||||||
if epoch > 0 and epoch % 10 == 0:
|
# if epoch > 0 and epoch % 10 == 0:
|
||||||
torch.save(chkpt, wdir + 'backup%g.pt' % epoch)
|
# torch.save(chkpt, wdir + 'backup%g.pt' % epoch)
|
||||||
|
|
||||||
# Delete checkpoint
|
# Delete checkpoint
|
||||||
del chkpt
|
del chkpt
|
||||||
|
@ -384,7 +384,8 @@ def train():
|
||||||
|
|
||||||
# save to cloud
|
# save to cloud
|
||||||
if opt.bucket:
|
if opt.bucket:
|
||||||
os.system('gsutil cp %s %s gs://%s' % (fresults, wdir + flast, opt.bucket))
|
os.system('gsutil cp %s gs://%s/results' % (fresults, opt.bucket))
|
||||||
|
os.system('gsutil cp %s gs://%s/weights' % (wdir + flast, opt.bucket))
|
||||||
|
|
||||||
if not opt.evolve:
|
if not opt.evolve:
|
||||||
plot_results() # save as results.png
|
plot_results() # save as results.png
|
||||||
|
|
Loading…
Reference in New Issue