LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
lbann::ltfb::RegularizedEvolution Class Referencefinal

#include <regularized_evolution.hpp>

Inheritance diagram for lbann::ltfb::RegularizedEvolution:
[legend]
Collaboration diagram for lbann::ltfb::RegularizedEvolution:
[legend]

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< MutationStrategym_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...
 

Detailed Description

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.

Member Enumeration Documentation

◆ metric_strategy

Enumerator
LOWER_IS_BETTER 
HIGHER_IS_BETTER 

Definition at line 55 of file regularized_evolution.hpp.

Constructor & Destructor Documentation

◆ RegularizedEvolution() [1/2]

lbann::ltfb::RegularizedEvolution::RegularizedEvolution ( std::string  metric_name,
metric_strategy  winner_strategy,
std::unique_ptr< MutationStrategy mutate_algo,
int  sample_size 
)

◆ ~RegularizedEvolution()

lbann::ltfb::RegularizedEvolution::~RegularizedEvolution ( )
default

◆ RegularizedEvolution() [2/2]

lbann::ltfb::RegularizedEvolution::RegularizedEvolution ( RegularizedEvolution const &  other)

Member Function Documentation

◆ evaluate_model()

EvalType lbann::ltfb::RegularizedEvolution::evaluate_model ( model m,
LTFBExecutionContext ctxt,
data_coordinator dc 
) const
private

Get the value of the given metric from the model.

◆ select_next()

void lbann::ltfb::RegularizedEvolution::select_next ( model m,
ltfb::LTFBExecutionContext ctxt,
data_coordinator dc 
) const
final

Member Data Documentation

◆ m_metric_name

std::string lbann::ltfb::RegularizedEvolution::m_metric_name
private

Name of the metric for evaluation.

Definition at line 91 of file regularized_evolution.hpp.

◆ m_metric_strategy

metric_strategy lbann::ltfb::RegularizedEvolution::m_metric_strategy
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.

◆ m_mutate_algo

std::unique_ptr<MutationStrategy> lbann::ltfb::RegularizedEvolution::m_mutate_algo
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.

◆ m_sample_size

int lbann::ltfb::RegularizedEvolution::m_sample_size
private

The size of the sample to choose from the population in every step.

Definition at line 100 of file regularized_evolution.hpp.


The documentation for this class was generated from the following file: