k2-fsa / fast_rnnt

A torch implementation of a recursion which turns out to be useful for RNN-T.
Other
139 stars 22 forks source link

Remove T>=S assertion for regular transducer loss #25

Closed desh2608 closed 1 year ago

desh2608 commented 1 year ago

See https://github.com/danpovey/fast_rnnt/issues/20

pkufool commented 1 year ago

@desh2608 Sorry, I did not notice this PR, I think if we remove T >= S assertion for regular transducer, we have to add another assert to make sure prune_range is large enough. For example, T == 2, range == 3 and S ==10, it can not cover all the S with 2 steps by range==3, and then result to a inf loss value.

[edit:] I saw we alreay merged this change to k2 (https://github.com/k2-fsa/k2/pull/1149), remember to revert it if this is really a problem. This should be rare cases, I think in icefall we will filter inf in train.py.

danpovey commented 1 year ago

ah Ok @pkufool ... perhaps we can say that prune_range is advisory, and it will print a warning and increase prune_range if there is that type of problem? I think that is less likely to be disruptive.

pkufool commented 1 year ago

Closed by https://github.com/k2-fsa/fast_rnnt/pull/29