fxia22 / stn.pytorch

pytorch version of spatial transformer networks
Other
587 stars 87 forks source link

cuda runtime error #16

Closed edgarriba closed 6 years ago

edgarriba commented 7 years ago

hi, I'm getting this error during the backward propagation:

Traceback (most recent call last):
  File "/home/eriba/code/main.py", line 259, in <module>
    main()
  File "/home/eriba/code/main.py", line 235, in main
    loss.backward()
  File "/usr/local/lib/python2.7/dist-packages/torch/autograd/variable.py", line 152, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables)
  File "/usr/local/lib/python2.7/dist-packages/torch/autograd/__init__.py", line 98, in backward
    variables, grad_variables, retain_graph)
  File "/home/eriba/software/stn.pytorch/script/functions/stn.py", line 72, in backward
    grad_input1 = grad_input1.cuda(self.device)
  File "/usr/local/lib/python2.7/dist-packages/torch/_utils.py", line 65, in _cuda
    return new_type(self.size()).copy_(self, async)
RuntimeError: cuda runtime error (77) : an illegal memory access was encountered at /home/eriba/software/pytorch/pytorch/torch/lib/THC/generic/THCTensorCopy.c:18

Any idea why would that happen ?

XuesongYang commented 7 years ago

same here.

chanmi commented 7 years ago

same here.

IngridLiu commented 6 years ago

Hi,have you solved this problem?

edgarriba commented 6 years ago

@IngridLiu switched to official pytorch functionality

IngridLiu commented 6 years ago

@edgarriba Thanks~ Do you mean that I should install pytorch from the official website? I have installed pytorch follow the official website as bellow. Linux; pip; python 2.7; cuda 8.0;

My GPU is GeForce GTX 1050,but I met the same error in GTX1080.

Could you tell me how to fix it more detailly?

Thank you very much!