liif
liif copied to clipboard
Met with cuda out of memory when I am testing the model
bash scripts/test-div2k.sh save/_train_edsr-baseline-liif/epoch-last.pth 0 then I met with RuntimeError: CUDA out of memory. Tried to allocate 676.00 MiB (GPU 0; 10.92 GiB total capacity; 827.98 MiB already allocated; 478.50 MiB free; 830.00 MiB reserved in total by PyTorch) how to solve this problem?
try reducing the batch size.
i met the same error(cuda oom) when test rdn-liif. did you solve this problem?
I have 4 GPU. But when I run code on GPU:2 ,I run this 'CUDA_VISIBLE_DEVICES=2 python demo.py --input 246.jpg --model rdn-liif.pth --resolution 2560,1440 --output output.png --gpu 0' and get 'cuda out of memory'. Than I try 'CUDA_VISIBLE_DEVICES=2 python demo.py --input 246.jpg --model rdn-liif.pth --resolution 1440,2560 --output output.png --gpu 2'. It work!!!
try reducing the batch size.
I tried to reduce the batch size to 1, but it didn't work.
I have 4 GPU. But when I run code on GPU:2 ,I run this 'CUDA_VISIBLE_DEVICES=2 python demo.py --input 246.jpg --model rdn-liif.pth --resolution 2560,1440 --output output.png --gpu 0' and get 'cuda out of memory'. Than I try 'CUDA_VISIBLE_DEVICES=2 python demo.py --input 246.jpg --model rdn-liif.pth --resolution 1440,2560 --output output.png --gpu 2'. It work!!!
I set the number of GPU to '1', but it still used GPU'0'.
RuntimeError: CUDA out of memory. Tried to allocate 4.46 GiB (GPU 0; 11.00 GiB total capacity; 6.84 GiB already allocated; 1.27 GiB free; 7.97 GiB reserved in total by PyTorch)