SeanNaren / warp-ctc

Pytorch Bindings for warp-ctc
Apache License 2.0
757 stars 271 forks source link

Error in recent update of pytorch #13

Closed jinserk closed 6 years ago

jinserk commented 6 years ago

Hi,

I've got some unknown error msg with latest pytorch update (0.4.0a0+8910dd5):

Traceback (most recent call last):
  File "train.py", line 343, in <module>
    loss.backward()
  File "/home/jbaik/.pyenv/versions/3.6.4/lib/python3.6/site-packages/torch/autograd/variable.py", line 128, in backward
    torch.autograd.backward(self, gradient, retain_graph, create_graph)
  File "/home/jbaik/.pyenv/versions/3.6.4/lib/python3.6/site-packages/torch/autograd/__init__.py", line 83, in backward
    variables, grad_variables, retain_graph, create_graph)
RuntimeError: expected Variable (got 'torch.cuda.FloatTensor')'

from the deepspeech.pytorch project. It looks like the warp_ctc generates this, so I reported here.

joemathai commented 6 years ago

Tried changing the self.grad to Variable type and this seems to work. But, I get a segmentation fault when the program exits.

Program received signal SIGSEGV, Segmentation fault. 0x00007fff865e2033 in THCCachingAllocator::~THCCachingAllocator() ()

jinserk commented 6 years ago

Thanks @joemathai, it works as you told. Will check if the seg fault occurs at the exit.

SeanNaren commented 6 years ago

Could you try #14 and see if this works for you?