I am trying to run a pytorch code with jupyter notebook and I got this error
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 2.00 GiB total capacity; 1.23 GiB already allocated; 18.83 MiB free; 1.25 GiB reserved in total by PyTorch)
I had already find answer. and most of all say just reduce the batch size. I have tried reduce the batch size from 20 to 10 to 2 and 1. Right now still can't run the code
My GPU is Quadro p620
torch.set_grad_enabled(False)or by using thetorch.no_gradcontext manager. Otherwise, you will unfortunately have to run it on the CPU. - Michael Jungo