1ytic / pytorch-edit-distance

Levenshtein edit-distance on PyTorch and CUDA
MIT License
94 stars 14 forks source link

Different outputs for multiple calls #2

Open jodusan opened 4 years ago

jodusan commented 4 years ago

When calling compute_wer() multiple times from debugger with the same params I get different results, often nan/infinity and sometimes numbers that greatly vary. I know cuda is not deterministic but this is barely usuable, any ideas what might be causing it? Did I miss some setting before running it?

1ytic commented 4 years ago

Thanks for debugging this package. I use this in another project open_stt_e2e. For example, you can see usage of AverageCER, AverageWER in train_ctc.py. Hope this helps you.

jodusan commented 4 years ago

@1ytic Do you use average because of the instability?

1ytic commented 4 years ago

Nope. AverageCER/WER accumulates error statistics (deletions, insertions, substitutions) for the entire dataset. I recommend you look at the test test.py. Maybe it helps you to understand the usage of the package.