This commit is contained in:
Glenn Jocher 2019-10-16 01:40:40 +02:00
parent d23ada04dc
commit d1271941ad
1 changed files with 5 additions and 0 deletions

View File

@ -371,6 +371,11 @@ def train():
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))
dist.destroy_process_group() if torch.cuda.device_count() > 1 else None dist.destroy_process_group() if torch.cuda.device_count() > 1 else None
torch.cuda.empty_cache() torch.cuda.empty_cache()
# save to cloud
# os.system(gsutil cp results.txt gs://...)
# os.system(gsutil cp weights/best.pt gs://...)
return results return results