PR #3279 - assert instead of reporting error to std::cerr
This commit is contained in:
parent
78c4ef17b1
commit
59c73f1c46
@ -96,11 +96,7 @@ DecoderState::next(const double *probs,
|
|||||||
if (full_beam && log_prob_c + prefix->score < min_cutoff) {
|
if (full_beam && log_prob_c + prefix->score < min_cutoff) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!prefix->is_empty() && prefix->timesteps.empty()) {
|
assert(prefix->is_empty() || !prefix->timesteps.empty());
|
||||||
// This should never happen. But we report it if it does.
|
|
||||||
std::cerr<<"error: non-empty prefix has empty timestep sequence"<<std::endl;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// blank
|
// blank
|
||||||
if (c == blank_id_) {
|
if (c == blank_id_) {
|
||||||
|
Loading…
Reference in New Issue
Block a user