Peng He
Committed by GitHub

Fix LogAdd (#316)

Using 0 as the initial value,  should not perform addition when both values are 0
... ... @@ -18,8 +18,10 @@ void Hypotheses::Add(Hypothesis hyp) {
} else {
it->second.log_prob = LogAdd<double>()(it->second.log_prob, hyp.log_prob);
it->second.lm_log_prob =
if (it->second.lm_log_prob != 0 && hyp.lm_log_prob != 0){
it->second.lm_log_prob =
LogAdd<double>()(it->second.lm_log_prob, hyp.lm_log_prob);
}
}
}
... ...