import gc
gc.collect()
import torch
torch.cuda.empty_cache()
tf.keras.backend.clear_session()
from numba import cuda
device = cuda.get_current_device()
device.reset()
from numba import cuda
device = cuda.get_current_device()
device.reset()
Last active
March 27, 2023 14:02
-
-
Save dsdanielpark/5d25fdfdfc9cd6cb7d388cfa1c087163 to your computer and use it in GitHub Desktop.
When you need to clean vram cache
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment