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: 'EncDecCTCModelBPE' object has no attribute '_wer'. Did you mean: 'wer'? #442

Open
Dreahim opened this issue Jan 22, 2024 · 1 comment

Comments

@Dreahim
Copy link

Dreahim commented Jan 22, 2024

Hello,
when I evaluate my ASR using this command, I get an error

python eval_beamsearch_ngram_ctc.py nemo_model_file=/home/user4/training/final_project/project6_nemo/models/python_model_conformer_ctc.nemo \               
             input_manifest=/home/user4/training/final_project/project6_nemo/data_manifest/dev_manifest4.json \
             kenlm_model_file=/home/user4/training/final_project/project6_nemo/LM/LM_models/old_LM_5gram \
             beam_width=[4,8,16,32,64] \
             beam_alpha=[-2.0,-1.0,0,1,2] \
             beam_beta=[-1.0,-0.5,0.0,0.5,1.0] \
             preds_output_folder=/home/user4/training/final_project/project6_nemo/LM/LM_models/pred \
             probs_cache_file=null \
             decoding_mode=beamsearch_ngram \
             decoding_strategy="flashlight"

The error is :
_File "/home/user4/training/final_project/project6_nemo/LM/NeMo/eval_beamsearch_ngram_ctc.py", line 353, in main
pred_text = asr_model._wer.decoding.ctc_decoder_predictions_tensor(preds_tensor)[0][0]
File "/home/user4/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1695, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'EncDecCTCModelBPE' object has no attribute 'wer'. Did you mean: 'wer'?

I tried to go to line 353 and change _wer to wer , ( I don't know if this was right), but after that It calculated WER and CER but I get this error:
Beam search requires that consecutive ctc tokens are not folded

please tell me how to fix the problem, thank you

@pianonyy
Copy link

pianonyy commented Oct 6, 2024

The same problem

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

2 participants