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

Allow zero length references for rnnt loss #1149

Merged
merged 3 commits into from
Feb 1, 2023

Conversation

desh2608
Copy link
Contributor

Based on some discussions with @danpovey, it seems the RNNT loss computation itself does not have any inherent requirement of references being non-zero. Allowing this relaxation would be useful for training with possibly empty references, e.g. cases where utterance is just noise or silence, or for multi-talker ASR (e.g. see k2-fsa/icefall#845).

@csukuangfj
Copy link
Collaborator

I think you can also remove the constraint

assert T >= S

That constraint is required only for modified transducer, where it can only move horizontally or diagonally.

@desh2608
Copy link
Contributor Author

desh2608 commented Jan 27, 2023

I think you can also remove the constraint

assert T >= S

That constraint is required only for modified transducer, where it can only move horizontally or diagonally.

Okay, I will make that constraint conditional on if the rnnt_type is modified.

BTW I suppose if we remove the T>=S assertion, we can also get rid of the corresponding data filtering in icefall recipes.

@csukuangfj
Copy link
Collaborator

Thanks. Would you mind also creating a PR in the repo danpovey/fast_rnnt ?

@csukuangfj
Copy link
Collaborator

Will merge it tomorrow. Thanks!

@csukuangfj
Copy link
Collaborator

Thanks for your contribution!

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

Successfully merging this pull request may close these issues.

None yet

2 participants