Skip to content

Commit

Permalink
Fix nbest decoding for online partial lattice (#1280)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkufool authored Apr 23, 2024
1 parent e8158de commit 50cdb51
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit 50cdb51

Please sign in to comment.