parlance / ctcdecode

PyTorch CTC Decoder bindings
MIT License
829 stars 245 forks source link

Convert to new pytorch apis #86

Closed KarimTarabishy closed 5 years ago

KarimTarabishy commented 5 years ago

Simple port to use new pytorch bindings and get rid of cffi

SeanNaren commented 5 years ago

This is awesome! I just tried installing using Pytorch 1.0 but the tests don't seem to run. I get this error:

Traceback (most recent call last):
  File "tests/test.py", line 7, in <module>
    import ctcdecode
  File "/home/sean.narenthiran/anaconda3/lib/python3.6/site-packages/ctcdecode/__init__.py", line 1, in <module>
    from ._ext import ctc_decode
ImportError: /home/sean.narenthiran/anaconda3/lib/python3.6/site-packages/ctcdecode/_ext/ctc_decode.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at19UndefinedTensorImpl10_singletonE

Have you managed to get the tests to run? or anything using ctcdecode

SeanNaren commented 5 years ago

Fixed by swapping the order :D, thanks for this!

KarimTarabishy commented 5 years ago

Yeah, this is correct I usually import torch in my main file before importing ctcdecode.