You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RuntimeError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 2.00 GiB total capacity; 1.26 GiB already allocated; 9.93 MiB free; 1.33 GiB reserved in total by PyTorch)
#382
Open
sharqawiDev opened this issue
Feb 11, 2020
· 2 comments
j'ai le même problème mais je ne sais pas encore comment le resourdre
Epoch gpu_mem GIoU obj cls total targets img_size
0% 0/32 [00:00<?, ?it/s]/usr/local/lib/python3.6/dist-packages/torch/cuda/memory.py:346: FutureWarning: torch.cuda.memory_cached has been renamed to torch.cuda.memory_reserved
FutureWarning)
0/299 13.3G 4.74 4.03 0 8.78 24 576: 62% 20/32 [00:37<00:16, 1.39s/it]Traceback (most recent call last):
File "train.py", line 414, in
train(hyp) # train normally
File "train.py", line 264, in train
pred = model(imgs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/content/drive/My Drive/2020_Julio_Yolo_projet/yolov3/models.py", line 238, in forward
return self.forward_once(x)
File "/content/drive/My Drive/2020_Julio_Yolo_projet/yolov3/models.py", line 292, in forward_once
x = module(x)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/container.py", line 117, in forward
input = module(input)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/conv.py", line 419, in forward
return self._conv_forward(input, self.weight)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/conv.py", line 416, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: CUDA out of memory. Tried to allocate 50.00 MiB (GPU 0; 14.73 GiB total capacity; 13.57 GiB already allocated; 17.88 MiB free; 13.72 GiB reserved in total by PyTorch)
0/299 13.3G 4.74 4.03 0 8.78 24 576: 62% 20/32 [00:40<00:24, 2.01s/it]
I try to use

Background-Removal.py
fromapp-seperation-semseg/
to remove the background from some images on my device, but I always get this error:My specs:
I found this replay on someone having the same issue:
pytorch/pytorch#16417 (comment)
but I don't know how to decrease the batch size.
I appreciate any help.
The text was updated successfully, but these errors were encountered: