pytorch-edit-distance icon indicating copy to clipboard operation
pytorch-edit-distance copied to clipboard

Different outputs for multiple calls

Open jodusan opened this issue 4 years ago • 3 comments

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?

jodusan avatar Mar 04 '20 10:03 jodusan

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.

1ytic avatar Mar 04 '20 11:03 1ytic

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

jodusan avatar Mar 04 '20 11:03 jodusan

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.

1ytic avatar Mar 04 '20 12:03 1ytic