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

RuntimeError: CUDA error: out of memory #14

Open
2679622694 opened this issue May 17, 2020 · 1 comment
Open

RuntimeError: CUDA error: out of memory #14

2679622694 opened this issue May 17, 2020 · 1 comment

Comments

@2679622694
Copy link

This is problem feedback:
Traceback (most recent call last):
File "main.py", line 188, in
main()
File "main.py", line 167, in main
outputs = model(inputs.unsqueeze(0))
File "/home/zjh/anaconda3/envs/psmnet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/zjh/DeepLabv3.pytorch-master/deeplab.py", line 193, in forward
x = self.layer1(x)
File "/home/zjh/anaconda3/envs/psmnet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/zjh/anaconda3/envs/psmnet/lib/python3.7/site-packages/torch/nn/modules/container.py", line 91, in forward
input = module(input)
File "/home/zjh/anaconda3/envs/psmnet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/zjh/DeepLabv3.pytorch-master/deeplab.py", line 119, in forward
out = self.conv2(out)
File "/home/zjh/anaconda3/envs/psmnet/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/zjh/anaconda3/envs/psmnet/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 301, in forward
self.padding, self.dilation, self.groups)
RuntimeError: CUDA error: out of memory

I have changed batchsize,but the problem has not been solved

@chenxi116
Copy link
Owner

The information you have provided is not enough for me to diagnose the problem for you. For example, what's your GPU memory size? How big are the images you are using? What is the batch size you are using? Have you tried a very small batch size like 2?

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