mlpack
master
|
Implementation of the AddMerge module class. More...
Public Member Functions | |
AddMerge () | |
Create the AddMerge object. More... | |
void | Add (LayerTypes layer) |
template<typename LayerType > | |
void | Add (const LayerType &layer) |
template<class LayerType , class... Args> | |
void | Add (Args...args) |
template<typename eT > | |
void | Backward (const arma::Mat< eT > &&, arma::Mat< eT > &&gy, arma::Mat< eT > &&g) |
Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backwards trough f. More... | |
OutputDataType const & | Delta () const |
Get the delta. More... | |
OutputDataType & | Delta () |
Modify the delta. More... | |
template<typename InputType , typename OutputType > | |
void | Forward (const InputType &&, OutputType &&output) |
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f. More... | |
InputDataType const & | InputParameter () const |
Get the input parameter. More... | |
InputDataType & | InputParameter () |
Modify the input parameter. More... | |
OutputDataType const & | OutputParameter () const |
Get the output parameter. More... | |
OutputDataType & | OutputParameter () |
Modify the output parameter. More... | |
template<typename Archive > | |
void | Serialize (Archive &ar, const unsigned int) |
Serialize the layer. More... | |
Private Attributes | |
DeleteVisitor | deleteVisitor |
Locally-stored delete visitor module object. More... | |
OutputDataType | delta |
Locally-stored delta object. More... | |
DeltaVisitor | deltaVisitor |
Locally-stored delta visitor module object. More... | |
InputDataType | inputParameter |
Locally-stored input parameter object. More... | |
std::vector< LayerTypes > | network |
OutputDataType | outputParameter |
Locally-stored output parameter object. More... | |
OutputParameterVisitor | outputParameterVisitor |
Locally-stored output parameter visitor module object. More... | |
Implementation of the AddMerge module class.
The AddMerge class accumulates the output of various modules.
InputDataType | Type of the input data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
OutputDataType | Type of the output data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
Definition at line 40 of file add_merge.hpp.
mlpack::ann::AddMerge< InputDataType, OutputDataType >::AddMerge | ( | ) |
Create the AddMerge object.
|
inline |
Definition at line 75 of file add_merge.hpp.
References mlpack::ann::AddMerge< InputDataType, OutputDataType >::network.
|
inline |
Definition at line 83 of file add_merge.hpp.
References mlpack::ann::AddMerge< InputDataType, OutputDataType >::network.
|
inline |
Definition at line 91 of file add_merge.hpp.
References mlpack::ann::AddMerge< InputDataType, OutputDataType >::network.
void mlpack::ann::AddMerge< InputDataType, OutputDataType >::Backward | ( | const arma::Mat< eT > && | , |
arma::Mat< eT > && | gy, | ||
arma::Mat< eT > && | g | ||
) |
Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backwards trough f.
Using the results from the feed forward pass.
input | The propagated input activation. |
gy | The backpropagated error. |
g | The calculated gradient. |
|
inline |
Get the delta.
Definition at line 104 of file add_merge.hpp.
References mlpack::ann::AddMerge< InputDataType, OutputDataType >::delta.
|
inline |
Modify the delta.
Definition at line 106 of file add_merge.hpp.
References mlpack::ann::AddMerge< InputDataType, OutputDataType >::delta, and mlpack::ann::AddMerge< InputDataType, OutputDataType >::Serialize().
void mlpack::ann::AddMerge< InputDataType, OutputDataType >::Forward | ( | const InputType && | , |
OutputType && | output | ||
) |
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f.
input | Input data used for evaluating the specified function. |
output | Resulting output activation. |
|
inline |
Get the input parameter.
Definition at line 94 of file add_merge.hpp.
References mlpack::ann::AddMerge< InputDataType, OutputDataType >::inputParameter.
|
inline |
Modify the input parameter.
Definition at line 96 of file add_merge.hpp.
References mlpack::ann::AddMerge< InputDataType, OutputDataType >::inputParameter.
|
inline |
Get the output parameter.
Definition at line 99 of file add_merge.hpp.
References mlpack::ann::AddMerge< InputDataType, OutputDataType >::outputParameter.
|
inline |
Modify the output parameter.
Definition at line 101 of file add_merge.hpp.
References mlpack::ann::AddMerge< InputDataType, OutputDataType >::outputParameter.
void mlpack::ann::AddMerge< InputDataType, OutputDataType >::Serialize | ( | Archive & | ar, |
const unsigned | int | ||
) |
Serialize the layer.
Referenced by mlpack::ann::AddMerge< InputDataType, OutputDataType >::Delta().
|
private |
Locally-stored delete visitor module object.
Definition at line 118 of file add_merge.hpp.
|
private |
Locally-stored delta object.
Definition at line 127 of file add_merge.hpp.
Referenced by mlpack::ann::AddMerge< InputDataType, OutputDataType >::Delta().
|
private |
Locally-stored delta visitor module object.
Definition at line 124 of file add_merge.hpp.
|
private |
Locally-stored input parameter object.
Definition at line 130 of file add_merge.hpp.
Referenced by mlpack::ann::AddMerge< InputDataType, OutputDataType >::InputParameter().
|
private |
Definition at line 115 of file add_merge.hpp.
Referenced by mlpack::ann::AddMerge< InputDataType, OutputDataType >::Add().
|
private |
Locally-stored output parameter object.
Definition at line 133 of file add_merge.hpp.
Referenced by mlpack::ann::AddMerge< InputDataType, OutputDataType >::OutputParameter().
|
private |
Locally-stored output parameter visitor module object.
Definition at line 121 of file add_merge.hpp.