LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
lbann::layer_term Class Reference

#include <layer_term.hpp>

Inheritance diagram for lbann::layer_term:
[legend]
Collaboration diagram for lbann::layer_term:
[legend]

Public Member Functions

 layer_term (EvalType scale_factor=EvalType(1))
 
layer_termcopy () const override
 
std::string name () const override
 
void set_layer (ViewingLayerPtr l)
 
Layerget_layer ()
 
const Layerget_layer () const
 
void setup (model &m) override
 
void start_evaluation () override
 
EvalType finish_evaluation () override
 
void differentiate () override
 
void compute_weight_regularization () override
 
template<typename ArchiveT >
void serialize (ArchiveT &ar)
 
- Public Member Functions inherited from lbann::objective_function_term
 objective_function_term (EvalType scale_factor=EvalType(1))
 
 objective_function_term (const objective_function_term &other)=default
 
objective_function_termoperator= (const objective_function_term &other)=default
 
virtual ~objective_function_term ()=default
 
template<class Archive >
void serialize (Archive &ar)
 
std::vector< ViewingLayerPtrget_layer_pointers () const
 
void set_layer_pointers (std::vector< ViewingLayerPtr > layers)
 
std::vector< ViewingWeightsPtrget_weights_pointers () const
 
void set_weights_pointers (std::vector< ViewingWeightsPtr > w)
 

Private Member Functions

void write_specific_proto (lbann_data::ObjectiveFunction &proto) const final
 Add objective function data to prototext. More...
 
Layerget_evaluation_layer ()
 

Additional Inherited Members

- Protected Member Functions inherited from lbann::objective_function_term
lbann_commget_comm ()
 
- Protected Attributes inherited from lbann::objective_function_term
EvalType m_scale_factor
 
std::vector< ViewingLayerPtrm_layers
 
std::vector< ViewingWeightsPtrm_weights
 

Detailed Description

Definition at line 35 of file layer_term.hpp.

Constructor & Destructor Documentation

◆ layer_term()

lbann::layer_term::layer_term ( EvalType  scale_factor = EvalType(1))
Here is the caller graph for this function:

Member Function Documentation

◆ compute_weight_regularization()

void lbann::layer_term::compute_weight_regularization ( )
inlineoverridevirtual

Compute the gradient of the weight regularization term. The gradient is computed w.r.t. the weights.

Implements lbann::objective_function_term.

Definition at line 57 of file layer_term.hpp.

Here is the call graph for this function:

◆ copy()

layer_term* lbann::layer_term::copy ( ) const
inlineoverridevirtual

Copy function.

Implements lbann::objective_function_term.

Definition at line 39 of file layer_term.hpp.

Here is the call graph for this function:

◆ differentiate()

void lbann::layer_term::differentiate ( )
overridevirtual

Compute the gradient of the objective function term. The gradient is computed w.r.t. the objective function term inputs. This should include the scaling factor.

Implements lbann::objective_function_term.

Here is the caller graph for this function:

◆ finish_evaluation()

EvalType lbann::layer_term::finish_evaluation ( )
overridevirtual

Complete evaluation of the objective function term.

Implements lbann::objective_function_term.

Here is the caller graph for this function:

◆ get_evaluation_layer()

Layer& lbann::layer_term::get_evaluation_layer ( )
private

Get corresponding evaluation layer.

Here is the caller graph for this function:

◆ get_layer() [1/2]

Layer& lbann::layer_term::get_layer ( )

Get corresponding layer.

Here is the caller graph for this function:

◆ get_layer() [2/2]

const Layer& lbann::layer_term::get_layer ( ) const

Get corresponding layer (const).

◆ name()

std::string lbann::layer_term::name ( ) const
inlineoverridevirtual

Get the name of the objective function term.

Implements lbann::objective_function_term.

Definition at line 40 of file layer_term.hpp.

Here is the call graph for this function:

◆ serialize()

template<typename ArchiveT >
void lbann::layer_term::serialize ( ArchiveT &  ar)
Here is the caller graph for this function:

◆ set_layer()

void lbann::layer_term::set_layer ( ViewingLayerPtr  l)

Set corresponding layer.

Here is the caller graph for this function:

◆ setup()

void lbann::layer_term::setup ( model m)
overridevirtual

Setup objective function term.

Reimplemented from lbann::objective_function_term.

Here is the caller graph for this function:

◆ start_evaluation()

void lbann::layer_term::start_evaluation ( )
overridevirtual

Start evaluation of the objective function term. This should include the scaling factor. The result is not available until finish_evaluation has been called.

Implements lbann::objective_function_term.

Here is the caller graph for this function:

◆ write_specific_proto()

void lbann::layer_term::write_specific_proto ( lbann_data::ObjectiveFunction &  proto) const
finalprivatevirtual

Add objective function data to prototext.

Implements lbann::objective_function_term.

Here is the caller graph for this function:

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