Hi, I’ve been training U-Net with medical imagery dataset. I used 1 of 2 RTX 2080 ti by allocating my model only on the first one. After learning through all epochs, my code crashed because there was an error in plotting images in Matplotlib. After fixing the error, I couldn’t run my code again due to this error.
RuntimeError: CUDA out of memory. Tried to allocate 98.00 MiB (GPU 0; 10.76 GiB total capacity; 9.58 GiB already allocated; 61.75 MiB free; 9.74 GiB reserved in total by PyTorch)

But when I display nvidia-smi, there is no process related to PyTorch.

I tried adding torch.cuda.empty_cache() but it didn’t seem to help. Are there ways to solve this problem?
Thank you