I’m trying to send my CNN model to the GPU device, but each time I run  model = model.to(device) I got an error “RuntimeError: CUDA error: out of memory”.
I tried to use
import torch
torch.cuda.empty_cache()

but that did not work, I’ve restarted the Kernal but that didn’t solve the problem. I checked the free/used memory, it looks full, I’ve tried to clean the memory using torch.cuda.empty_cache() that did not work, the below image shows the free/used memory.
I don’t have any idea why this error pops-up even I don’t send or train any model on the GPU.

nivida_gpu1293×323 41.1 KB