|
LBANN
0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
|
#include <regularized_evolution.hpp>
Public Types | |
| enum | metric_strategy { metric_strategy::LOWER_IS_BETTER, metric_strategy::HIGHER_IS_BETTER } |
Public Member Functions | |
| RegularizedEvolution (std::string metric_name, metric_strategy winner_strategy, std::unique_ptr< MutationStrategy > mutate_algo, int sample_size) | |
| ~RegularizedEvolution ()=default | |
| RegularizedEvolution (RegularizedEvolution const &other) | |
| void | select_next (model &m, ltfb::LTFBExecutionContext &ctxt, data_coordinator &dc) const final |
Public Member Functions inherited from lbann::Cloneable< RegularizedEvolution, MetaLearningStrategy > | |
| std::unique_ptr< RegularizedEvolution > | clone () const |
| Return an exception-safe, memory-safe copy of this object. More... | |
Private Member Functions | |
| EvalType | evaluate_model (model &m, LTFBExecutionContext &ctxt, data_coordinator &dc) const |
| Get the value of the given metric from the model. More... | |
Private Attributes | |
| std::unique_ptr< MutationStrategy > | m_mutate_algo |
| The strategy for mutation of a model. More... | |
| std::string | m_metric_name |
| Name of the metric for evaluation. More... | |
| metric_strategy | m_metric_strategy |
| Strategy to consider for evaluating the metric e.g., HIGHER_IS_BETTER or LOWER_IS_BETTER. More... | |
| int | m_sample_size |
| The size of the sample to choose from the population in every step. More... | |
This is a meta-learning strategy in population-based training. A sample of trainers is chosen from a population in every tournament. The best trainer is chosen from that sample according to an evaluation metric. Then the model from that best trainer is mutated and replaces the oldest model.
Definition at line 51 of file regularized_evolution.hpp.
| Enumerator | |
|---|---|
| LOWER_IS_BETTER | |
| HIGHER_IS_BETTER | |
Definition at line 55 of file regularized_evolution.hpp.
| lbann::ltfb::RegularizedEvolution::RegularizedEvolution | ( | std::string | metric_name, |
| metric_strategy | winner_strategy, | ||
| std::unique_ptr< MutationStrategy > | mutate_algo, | ||
| int | sample_size | ||
| ) |
|
default |
| lbann::ltfb::RegularizedEvolution::RegularizedEvolution | ( | RegularizedEvolution const & | other | ) |
|
private |
Get the value of the given metric from the model.
|
final |
|
private |
Name of the metric for evaluation.
Definition at line 91 of file regularized_evolution.hpp.
|
private |
Strategy to consider for evaluating the metric e.g., HIGHER_IS_BETTER or LOWER_IS_BETTER.
Definition at line 96 of file regularized_evolution.hpp.
|
private |
The strategy for mutation of a model.
When a trainer loses in a LTFB tournament, the winning model is copied over to it and this mutation strategy is applied to the copied model to explore a new model. This is relevant to neural architecture search (NAS).
Definition at line 87 of file regularized_evolution.hpp.
|
private |
The size of the sample to choose from the population in every step.
Definition at line 100 of file regularized_evolution.hpp.