|
| AddMerge (const bool model=false, const bool run=true) |
| Create the AddMerge object using the specified parameters. More...
|
|
| AddMerge (const bool model, const bool run, const bool ownsLayers) |
| Create the AddMerge object using the specified parameters. More...
|
|
| ~AddMerge () |
| Destructor to release allocated memory.
|
|
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...
|
|
template<typename eT > |
void | Backward (const arma::Mat< eT > &, const 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...
|
|
template<typename eT > |
void | Backward (const arma::Mat< eT > &, const arma::Mat< eT > &gy, arma::Mat< eT > &g, const size_t index) |
| This is the overload of Backward() that runs only a specific layer with the given input. More...
|
|
template<typename eT > |
void | Gradient (const arma::Mat< eT > &input, const arma::Mat< eT > &error, arma::Mat< eT > &gradient) |
|
template<typename eT > |
void | Gradient (const arma::Mat< eT > &input, const arma::Mat< eT > &error, arma::Mat< eT > &gradient, const size_t index) |
|
template<class LayerType , class... Args> |
void | Add (Args... args) |
|
void | Add (LayerTypes< CustomLayers... > layer) |
|
InputDataType const & | InputParameter () const |
| Get the input parameter.
|
|
InputDataType & | InputParameter () |
| Modify the input parameter.
|
|
OutputDataType const & | OutputParameter () const |
| Get the output parameter.
|
|
OutputDataType & | OutputParameter () |
| Modify the output parameter.
|
|
OutputDataType const & | Delta () const |
| Get the delta.
|
|
OutputDataType & | Delta () |
| Modify the delta.
|
|
std::vector< LayerTypes< CustomLayers... > > & | Model () |
| Return the model modules.
|
|
OutputDataType const & | Parameters () const |
| Get the parameters.
|
|
OutputDataType & | Parameters () |
| Modify the parameters.
|
|
bool | Run () const |
| Get the value of run parameter.
|
|
bool & | Run () |
| Modify the value of run parameter.
|
|
template<typename Archive > |
void | serialize (Archive &ar, const uint32_t) |
| Serialize the layer.
|
|
template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat, typename... CustomLayers>
class mlpack::ann::AddMerge< InputDataType, OutputDataType, CustomLayers >
Implementation of the AddMerge module class.
The AddMerge class accumulates the output of various modules.
- Template Parameters
-
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). |
CustomLayers | Additional custom layers that can be added. |
template<typename InputDataType , typename OutputDataType , typename... CustomLayers>
template<typename eT >
void mlpack::ann::AddMerge< InputDataType, OutputDataType, CustomLayers >::Backward |
( |
const arma::Mat< eT > & |
, |
|
|
const 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.
- Parameters
-
* | (input) The propagated input activation. |
gy | The backpropagated error. |
g | The calculated gradient. |
template<typename InputDataType , typename OutputDataType , typename... CustomLayers>
template<typename InputType , typename OutputType >
void mlpack::ann::AddMerge< InputDataType, OutputDataType, CustomLayers >::Forward |
( |
const InputType & |
input, |
|
|
OutputType & |
output |
|
) |
| |
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f.
- Parameters
-
* | (input) Input data used for evaluating the specified function. |
output | Resulting output activation. |