mirror of
https://github.com/marian-nmt/marian.git
synced 2024-09-11 06:15:56 +03:00
Add a warning message for an incorrect use of output sampling (#585)
Add a warning message if sampling with beam-size > 1 or ensembles
This commit is contained in:
parent
533604024b
commit
990aeb5daf
@ -109,6 +109,17 @@ public:
|
||||
|
||||
threadPool.enqueue(task, device, id++);
|
||||
}
|
||||
|
||||
if(options_->get<bool>("output-sampling", false)) {
|
||||
if(options_->get<size_t>("beam-size") > 1)
|
||||
LOG(warn,
|
||||
"[warning] Output sampling and beam search (beam-size > 1) are contradictory methods "
|
||||
"and using them together is not recommended. Set beam-size to 1");
|
||||
if(options_->get<std::vector<std::string>>("models").size() > 1)
|
||||
LOG(warn,
|
||||
"[warning] Output sampling and model ensembling are contradictory methods and using "
|
||||
"them together is not recommended. Use a single model");
|
||||
}
|
||||
}
|
||||
|
||||
void run() override {
|
||||
|
Loading…
Reference in New Issue
Block a user