|
LBANN
0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
|
#include <objective_function.hpp>
Private Attributes | |
| std::vector< std::unique_ptr< objective_function_term > > | m_terms |
| std::map< execution_mode, metric_statistics > | m_statistics |
| EvalType | m_evaluation_time = EvalType(0) |
| EvalType | m_differentiation_time = EvalType(0) |
Objective function class.
Definition at line 36 of file objective_function.hpp.
|
inline |
Default constructor.
Definition at line 40 of file objective_function.hpp.
| lbann::objective_function::objective_function | ( | const objective_function & | other | ) |
Copy constructor.
|
default |
Destructor.
| void lbann::objective_function::add_term | ( | std::unique_ptr< objective_function_term > | term | ) |
Add a term to the objective function.
| void lbann::objective_function::compute_weight_regularization | ( | ) |
Compute the gradient of the weight regularization term. The gradient is computed w.r.t. the weights.
|
inline |
Copy function.
Definition at line 49 of file objective_function.hpp.
| void lbann::objective_function::differentiate | ( | ) |
Compute the objective function gradient. The gradient is with respect to the objective function inputs
| EvalType lbann::objective_function::finish_evaluation | ( | execution_mode | mode, |
| int | mini_batch_size | ||
| ) |
Complete evaluation of the objective function. The result is stored in history.
|
inline |
Get the time spent computing the objective function gradient.
Definition at line 117 of file objective_function.hpp.
|
inline |
Get the time spent evaluating the objective function.
Definition at line 115 of file objective_function.hpp.
| std::vector<ViewingLayerPtr> lbann::objective_function::get_layer_pointers | ( | ) | const |
Get list of pointers to layers.
| EvalType lbann::objective_function::get_mean_value | ( | execution_mode | mode | ) | const |
Get mean objective function value. This is a weighted average such that each mini-batch sample makes an equal contribution.
| int lbann::objective_function::get_statistics_num_samples | ( | execution_mode | mode | ) | const |
Get number of samples for statistics.
| std::vector<objective_function_term*> lbann::objective_function::get_terms | ( | ) |
Get list of objective function terms.
| std::vector<ViewingWeightsPtr> lbann::objective_function::get_weights_pointers | ( | ) | const |
Get list of pointers to weights.
| objective_function& lbann::objective_function::operator= | ( | const objective_function & | other | ) |
Copy assignment operator.
|
inline |
Reset time counters.
Definition at line 119 of file objective_function.hpp.
|
inline |
Clear all statistics.
Definition at line 88 of file objective_function.hpp.
|
inline |
Clear statistics for an execution mode.
Definition at line 95 of file objective_function.hpp.
| void lbann::objective_function::serialize | ( | Archive & | ar | ) |
Archive for checkpoint and restart
| void lbann::objective_function::set_layer_pointers | ( | std::vector< ViewingLayerPtr > | layers | ) |
Set list of pointers to layers.
| void lbann::objective_function::set_weights_pointers | ( | std::vector< ViewingWeightsPtr > | w | ) |
Set list of pointers to weights.
| void lbann::objective_function::setup | ( | model & | m | ) |
Setup objective function.
| void lbann::objective_function::start_evaluation | ( | execution_mode | mode, |
| int | mini_batch_size | ||
| ) |
Start evaluating the objective function. This function takes the model's current mini-batch size. If multiple models are being trained, the current mini-batch size may be different from the effective mini-batch size. The result is not guaranteed to be available until finish_evaluation is called.
| void lbann::objective_function::write_proto | ( | lbann_data::ObjectiveFunction & | proto | ) | const |
Add Objection Function data to prototext
Time spent computing the objective function gradient.
Definition at line 138 of file objective_function.hpp.
Time spent evaluating the objective function.
Definition at line 136 of file objective_function.hpp.
|
private |
Objective funciton statistics.
Definition at line 133 of file objective_function.hpp.
|
private |
List of objective function terms.
Definition at line 130 of file objective_function.hpp.