Closed JeremyCCHsu closed 6 years ago
I got the same error. I tried to change the type of activation to floatTensor but the type is still tensor. Have you fixed this error?
Hi @JeremyCCHsu, I changed the check_type() function in /libs/warp-ctc/pytorch_binding/functions/ctc.py to
def check_type(var, t, name): if not isinstance(var, t): raise TypeError("{} must be {}".format(name, t))
`pytest ======================================= test session starts ======================================= platform darwin -- Python 2.7.15, pytest-3.2.3, py-1.4.34, pluggy-0.4.0 rootdir: /Users/edison/PycharmProjects/speech-master/tests, inifile: collected 9 items
ctc_test.py .. io_test.py . loader_test.py .. model_test.py . seq2seq_test.py . wave_test.py ..
==================================== 9 passed in 0.82 seconds ===================================== `
x.type() is the right way to show the type of a tensor ==> 'torch.FloatTensor' type(x) only returns torch.tensor.
@edchengg Thank you so much! I didn't realize this and what x.type()
returned was a string...
Environment
Titan Xp CUDA 9.0 cnDNN 7.1.3
Ubuntu 16.04 Python 2.7 Pytorch 0.4.0
Code to reproduce the issue
when I was running the training on my own data (or with
pytest
), it fails with the following error:Anyone has an idea what happens? This issue persists with or without GPU.