Skip to content
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

AttributeError: 'WaveToLetter' object has no attribute 'module' #8

Open
IAmEnchant opened this issue Nov 9, 2019 · 5 comments
Open

Comments

@IAmEnchant
Copy link

Hi, I have a problem on running train.py.
Here is traceback.

Traceback (most recent call last):
File "train.py", line 528, in
wer_results=wer_results, cer_results=cer_results),
File "/home/enchant/wav2letter/wav2letter.pytorch/model.py", line 218, in serialize
model = model.module if model_is_cuda else model
File "/home/enchant/tmp/wav2letter-venv/lib/python3.7/site-packages/torch/nn/modules/module.py", line 539, in getattr
type(self).name, name))
AttributeError: 'WaveToLetter' object has no attribute 'module'

My environment is

Python 3.7.5
Cuda 10.0
apex 0.1
audioread 2.1.8
certifi 2019.9.11
cffi 1.13.2
chardet 3.0.4
ctcdecode 0.4
decorator 4.4.1
idna 2.8
joblib 0.14.0
jsonpatch 1.24
jsonpointer 2.0
librosa 0.7.1
llvmlite 0.30.0
numba 0.46.0
numpy 1.15.4
Pillow 6.2.1
pip 19.3.1
pkg-resources 0.0.0
protobuf 3.10.0
pycparser 2.19
python-Levenshtein 0.12.0
pyzmq 18.1.0
requests 2.22.0
resampy 0.2.2
scikit-learn 0.21.3
scipy 1.3.1
setuptools 41.6.0
six 1.13.0
SoundFile 0.10.2
tensorboardX 1.9
torch 1.1.0
torchaudio 0.2
torchfile 0.1.0
torchvision 0.2.1
tornado 6.0.3
tqdm 4.38.0
urllib3 1.25.6
visdom 0.1.8.9
warpctc-pytorch 0.1
websocket-client 0.56.0
wget 3.2
wheel 0.33.6

Thanks.

@vaibhav0195
Copy link
Collaborator

vaibhav0195 commented Nov 11, 2019

Hi,
This error seems to occur while serializing the model.
Can you please try with the following requirement file - I use this to run my experiments, and check the results again ?
apex==0.1
audioread==2.1.6
certifi==2019.3.9
chardet==3.0.4
ctcdecode==0.4
decorator==4.4.0
idna==2.8
joblib==0.13.2
librosa==0.6.3
llvmlite==0.28.0
numba==0.43.0
numpy==1.16.2
Pillow==5.4.1
pkg-resources==0.0.0
protobuf==3.7.0
python-Levenshtein==0.12.0
python-speech-features==0.6
pyzmq==18.0.1
requests==2.21.0
resampy==0.2.1
scikit-learn==0.20.3
scipy==1.2.1
six==1.12.0
tensorboardX==1.6
torch==1.0.1.post2
torchaudio==0.2
torchfile==0.1.0
tornado==6.0.1
tqdm==4.31.1
urllib3==1.24.1
visdom==0.1.8.8
warpctc-pytorch==0.1
websocket-client==0.56.0
wget==3.2

hope this helps.

@IAmEnchant
Copy link
Author

IAmEnchant commented Nov 11, 2019

apex==0.1
audioread==2.1.6
certifi==2019.3.9
chardet==3.0.4
ctcdecode==0.4
decorator==4.4.0
idna==2.8
joblib==0.13.2
librosa==0.6.3
llvmlite==0.28.0
numba==0.43.0
numpy==1.16.2
Pillow==5.4.1
pkg-resources==0.0.0
protobuf==3.7.0
python-Levenshtein==0.12.0
python-speech-features==0.6
pyzmq==18.0.1
requests==2.21.0
resampy==0.2.1
scikit-learn==0.20.3
scipy==1.2.1
six==1.12.0
tensorboardX==1.6
torch==1.0.1.post2
torchaudio==0.2
torchfile==0.1.0
tornado==6.0.1
tqdm==4.31.1
urllib3==1.24.1
visdom==0.1.8.8
warpctc-pytorch==0.1
websocket-client==0.56.0
wget==3.2

I installed using above requirements and get this error now.

(wav2letter-venv) enchant@tf-server:~/wav2letter/wav2letter.pytorch$ python train.py --train-manifest ~/data/CV/en/clips/train.csv --val-manifest ~/data/CV/en/clips/dev.csv
Traceback (most recent call last):
File "train.py", line 13, in
from warpctc_pytorch import CTCLoss
File "/home/enchant/tmp/wav2letter-venv/lib/python3.7/site-packages/warpctc_pytorch-0.1-py3.7-linux-x86_64.egg/warpctc_pytorch/init.py", line 6, in
from ._warp_ctc import *
ImportError: /home/enchant/tmp/wav2letter-venv/lib/python3.7/site-packages/warpctc_pytorch-0.1-py3.7-linux-x86_64.egg/warpctc_pytorch/_warp_ctc.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN3c1019UndefinedTensorImpl10_singletonE

so I re-install warpctc and ctcdecode but the same result.

@vaibhav0195
Copy link
Collaborator

For the warp ctc error,
I think the error is related to - SeanNaren/warp-ctc#103 .
Hope this helps.

@ishita1995
Copy link

I am getting exactly the same problem.
I checked, my versions are up to date.
@IAmEnchant did this solution work for you ?

@vaibhav0195
Copy link
Collaborator

Hi @ishita1995
what are your versions of pytorch and cuda ?
can you please tell me your lib versions ?

Thanks

@vaibhav0195 vaibhav0195 reopened this Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants