Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Met with cuda out of memory when I am testing the model #33

Open
Patricia1019 opened this issue Jul 10, 2021 · 5 comments
Open

Met with cuda out of memory when I am testing the model #33

Patricia1019 opened this issue Jul 10, 2021 · 5 comments

Comments

@Patricia1019
Copy link

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?

@sangjun04
Copy link

try reducing the batch size.

@xuejiancai
Copy link

i met the same error(cuda oom) when test rdn-liif.
did you solve this problem?

@Lovegood-1
Copy link

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!!!

@Irina51244
Copy link

try reducing the batch size.

I tried to reduce the batch size to 1, but it didn't work.

@Irina51244
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants