DeepLabv3.pytorch icon indicating copy to clipboard operation
DeepLabv3.pytorch copied to clipboard

RuntimeError: CUDA error: out of memory

Open 2679622694 opened this issue 5 years ago • 1 comments

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

2679622694 avatar May 17 '20 11:05 2679622694

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?

chenxi116 avatar May 19 '20 22:05 chenxi116