sanghyun-son / EDSR-PyTorch

PyTorch version of the paper 'Enhanced Deep Residual Networks for Single Image Super-Resolution' (CVPRW 2017)
MIT License
2.43k stars 670 forks source link

RuntimeError: CUDA out of memory. #333

Open rezraz1 opened 2 years ago

rezraz1 commented 2 years ago

Hi, I tried to run the code with trained models (EDSR) and got an error about CUDA and GPU that is given below :

RuntimeError: CUDA out of memory. Tried to allocate 2.64 GiB (GPU 0; 4.00 GiB to
tal capacity; 1.15 GiB already allocated; 2.21 GiB free; 1.19 GiB reserved in to
tal by PyTorch)

Apparently this error occurs due to the GPU, now I want to know if there is a possibility for the code to run on the CPU? How can the code be changed? (If we consider that there is no memory problem.)

@sanghyun-son Thank you very much for your guidance