| 534 | TermCriteria const&>>; |
| 535 | |
| 536 | StoppingCriteriaFactory make_factory() |
| 537 | { |
| 538 | using namespace lbann; |
| 539 | using namespace std; |
| 540 | StoppingCriteriaFactory factory; |
| 541 | factory.register_builder(TermCriteria::kMaxBatches, |
| 542 | [](TermCriteria const& msg) { |
| 543 | return make_unique<BatchTerminationCriteria>( |
| 544 | msg.max_batches()); |
| 545 | }); |
| 546 | factory.register_builder(TermCriteria::kMaxEpochs, |
| 547 | [](TermCriteria const& msg) { |
| 548 | return make_unique<EpochTerminationCriteria>( |
| 549 | msg.max_epochs()); |
| 550 | }); |
| 551 | factory.register_builder(TermCriteria::kMaxSeconds, |
| 552 | [](TermCriteria const& msg) { |
| 553 | return make_unique<SecondsTerminationCriteria>( |
| 554 | msg.max_seconds()); |
| 555 | }); |
| 556 | return factory; |
| 557 | } |
| 558 | |
| 559 | StoppingCriteriaFactory& term_criteria_factory() |
| 560 | { |
no outgoing calls
no test coverage detected