| 409 | |
| 410 | |
| 411 | BeamSearch::BeamSearch(const dim_t beam_size, |
| 412 | const float length_penalty, |
| 413 | const float coverage_penalty, |
| 414 | const float prefix_bias_beta, |
| 415 | const float patience) |
| 416 | : _beam_size(beam_size) |
| 417 | , _length_penalty(length_penalty) |
| 418 | , _coverage_penalty(coverage_penalty) |
| 419 | , _prefix_bias_beta(prefix_bias_beta) |
| 420 | , _max_candidates(get_max_candidates(beam_size, patience)) |
| 421 | { |
| 422 | } |
| 423 | |
| 424 | std::vector<DecodingResult> |
| 425 | BeamSearch::search(layers::Decoder& decoder, |
nothing calls this directly
no test coverage detected