Skip to content

Commit

Permalink
PR #3279 - Reverted unrelated and unwanted change.
Browse files Browse the repository at this point in the history
  • Loading branch information
godeffroy committed Sep 17, 2020
1 parent 371ddb8 commit 188501a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions native_client/ctcdecode/ctc_beam_search_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,13 @@ DecoderState::decode(size_t num_results) const
std::vector<Output> outputs;
outputs.reserve(num_returned);

for (PathTrie* prefix : prefixes_copy) {
for (size_t i = 0; i < num_returned; ++i) {
Output output;
prefix->get_path_vec(output.tokens);
output.timesteps = get_history(prefix->timesteps, &timestep_tree_root_);
prefixes_copy[i]->get_path_vec(output.tokens);
output.timesteps = get_history(prefixes_copy[i]->timesteps, &timestep_tree_root_);
assert(output.tokens.size() == output.timesteps.size());
output.confidence = scores[prefix];
output.confidence = scores[prefixes_copy[i]];
outputs.push_back(output);
if (outputs.size() >= num_returned) break;
}

return outputs;
Expand Down

0 comments on commit 188501a

Please sign in to comment.