Skip to content

Commit

Permalink
[Arm] fix viterbi_decode compute best_path (#10101)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjp9527 authored Mar 15, 2023
1 parent 0dd6280 commit f0dd78c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lite/backends/arm/math/viterbi_decode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void viterbi_decode(
batch_path_ptr + (actual_len - last_ids_index) * batch,
batch);
arange(batch_offset_ptr, batch, n_labels);
for (int sl = 0; sl < max_seq_len - 1; sl++) {
for (int sl = max_seq_len - 2; sl >= 0; sl--) {
++last_ids_index;
vector_add(1, left_length_ptr, left_length_ptr, batch);
vector_add(batch_offset_ptr, last_ids_ptr, gather_idx_ptr, batch);
Expand Down

0 comments on commit f0dd78c

Please sign in to comment.