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

Fix nbest decoding for online partial lattice #1280

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions k2/csrc/intersect_dense_pruned.cu
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,11 @@ class MultiGraphDenseIntersectPruned {
ArcInfo old_ai = arcs_data[old_idx012];
// Only 1 state (the final state) in next frame, so idx1 is always 0.
old_ai.u.dest_info_state_idx1 = 0;
// The final arcs we are adding for online decoding partial should not
// map to any real arc in a_fsas.
// We add these final arcs for the purpose of making the partial lattice
// a valid Fsa.
old_ai.a_fsas_arc_idx012 = -1;
new_arcs_data[new_idx012] = old_ai;
});

Expand Down
Loading