Ensure proper removal of prefix

Fixes #2230
This commit is contained in:
Alexandre Lissy 2019-07-10 10:15:13 +02:00
parent fdda74d498
commit c3a2b6ea48

View File

@ -150,6 +150,9 @@ decoder_next(const double *probs,
for (size_t i = beam_size; i < state->prefixes.size(); ++i) {
state->prefixes[i]->remove();
}
// Remove the elements from std::vector
state->prefixes.resize(beam_size);
}
} // end of loop over time