AHN Sung Hwan
Committed by GitHub

Fix a bug in mean calculation of 'ys_probs' (#748)

... ... @@ -152,7 +152,7 @@ void TransducerKeywordDecoder::Decode(
if (matched) {
float ys_prob = 0.0;
int32_t length = best_hyp.ys_probs.size();
for (int32_t i = 1; i <= matched_state->level; ++i) {
for (int32_t i = 0; i < matched_state->level; ++i) {
ys_prob += best_hyp.ys_probs[i];
}
ys_prob /= matched_state->level;
... ...