Skip to content

Instantly share code, notes, and snippets.

@philip-bl
Created April 27, 2019 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philip-bl/752c3dc04e2ee09c59bd828741c5057d to your computer and use it in GitHub Desktop.
Save philip-bl/752c3dc04e2ee09c59bd828741c5057d to your computer and use it in GitHub Desktop.
def free_cuda_memory():
import gc
gc.collect()
torch.cuda.empty_cache()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment