I tried to run the densenet model which result in an error.
RuntimeError: CUDA out of memory. Tried to allocate 60.00 MiB (GPU 0; 11.17 GiB total capacity; 10.64 GiB already allocated; 51.31 MiB free; 10.78 GiB reserved in total by PyTorch)
Then I tried using the previous model resnet which was successfully working but it also started showing the same result.
This happens when your GPU ram is full. Restarting the kernel should empty the GPU ram (you can check with '!nvidia-smi' in Jupyter). Then to avoid the error, the easiest way is to use a smaller batch size, especially when training a large model like densenet. I hope that helps :)