-
Notifications
You must be signed in to change notification settings - Fork 119
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 runtime error (2) #69
Comments
I also am stuck with this when I try to test. Any ideas? Pytorch 0.4.0, cuda 8 (have also tried cuda 9, 10, with same results). |
Hi. This is because GPU is not enough. So my solution for this is I equip another GPU for my computer and reduce the batch size from 16 to 4. Then I could run the training and testing. |
when you test on big images, you should input the images by patches to solve this problem |
like this |
local_weight = local_weight.contiguous().view(x.size(2),scale_int, x.size(3),scale_int,-1,3).permute(1,3,0,2,4,5).contiguous() Hello, I still couldn't test on big images (from Manga109 test set). It showed the above error. I revised the code based on the above code you provided but it seems like it did not work. Any further suggestions |
THCudaCheck FAIL file=c:\programdata\miniconda3\conda-bld\pytorch_1524546354046\work\aten\src\thc\generic/THCStorage.cu line=58 error=2 : out of memory
Traceback (most recent call last):
File "main.py", line 24, in
main()
File "main.py", line 20, in main
t.test()
File "C:\Users\DIC\Meta-SR-Pytorch\trainer.py", line 218, in test
sr = self.model(lr, idx_scale,scale_coord_map)
File "D:\3rd_semester\anaconda3\envs\python35\lib\site-packages\torch\nn\modules\module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "C:\Users\DIC\Meta-SR-Pytorch\model_init_.py", line 54, in forward
return self.model(x,pos_mat)
File "D:\3rd_semester\anaconda3\envs\python35\lib\site-packages\torch\nn\modules\module.py", line 491, in call
result = self.forward(*input, **kwargs)
File "C:\Users\DIC\Meta-SR-Pytorch\model\metardn.py", line 134, in forward
local_weight = local_weight.contiguous().view(x.size(2),scale_int, x.size(3),scale_int,-1,3).permute(1,3,0,2,4,5).contiguous()
RuntimeError: cuda runtime error (2) : out of memory at c:\programdata\miniconda3\conda-bld\pytorch_1524546354046\work\aten\src\thc\generic/THCStorage.cu:58
if anyone encountered this error while running the test demo. and any solution for it. Looking forward to your help. Thank you
The text was updated successfully, but these errors were encountered: