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

CUDA error: out of memory #22

Open
siinem opened this issue Nov 16, 2018 · 2 comments
Open

CUDA error: out of memory #22

siinem opened this issue Nov 16, 2018 · 2 comments

Comments

@siinem
Copy link

siinem commented Nov 16, 2018

Hi,
By not changing anything on the code, i ve ran train.py for the augmented pascal voc dataset. But im getting CUDA error. Might you have a suggestion on how i can solve this?

A detailed error message is as below.

Thanks in advance.
sinem.

 File "train.py", line 234, in <module>
   main()
 File "train.py", line 213, in main
   pred = interp(model(images))
 File "/home/sinem/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
   result = self.forward(*input, **kwargs)
 File "/media/sinem/LENOVO/Pytorch-Deeplab-master/deeplab/model.py", line 261, in forward
   x = self.layer5(x)
 File "/home/sinem/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
   result = self.forward(*input, **kwargs)
 File "/media/sinem/LENOVO/Pytorch-Deeplab-master/deeplab/model.py", line 115, in forward
   out += self.conv2d_list[i+1](x)
 File "/home/sinem/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
   result = self.forward(*input, **kwargs)
 File "/home/sinem/anaconda3/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 301, in forward
   self.padding, self.dilation, self.groups)
RuntimeError: CUDA error: out of memory

@speedinghzl
Copy link
Owner

Maybe you can reduce the batch size to fit your GPU memory.

@siinem
Copy link
Author

siinem commented Nov 16, 2018

Maybe you can reduce the batch size to fit your GPU memory.

I could be able to run only when the batch size was 1 :( My GPU is GeForce GTX 1050 Ti - 4 GB .

Then, for small batch sizes, how can i freeze the BP statistics? with which command from console?

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

2 participants