13 #ifndef MLPACK_METHODS_ANN_LAYER_MULTIPLY_MERGE_HPP 14 #define MLPACK_METHODS_ANN_LAYER_MULTIPLY_MERGE_HPP 37 typename InputType = arma::mat,
38 typename OutputType = arma::mat
76 void Forward(
const InputType& , OutputType& output);
98 void Gradient(
const InputType& input,
99 const OutputType& error,
100 OutputType& gradient);
113 template<
typename Archive>
114 void serialize(Archive& ar,
const uint32_t );
135 #include "multiply_merge_impl.hpp" MultiplyMergeType(const bool model=false, const bool run=true)
Create the MultiplyMerge object using the specified parameters.
Linear algebra utility functions, generally performed on matrices or vectors.
void Forward(const InputType &, OutputType &output)
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activ...
OutputType & Parameters()
Modify the parameters.
size_t WeightSize() const
Get the size of the weights.
The core includes that mlpack expects; standard C++ includes and Armadillo.
Implementation of the MultiplyMerge module class.
void Gradient(const InputType &input, const OutputType &error, OutputType &gradient)
OutputType const & Parameters() const
Get the parameters.
A "multi-layer" is a layer that is a wrapper around other layers.
void serialize(Archive &ar, const uint32_t)
Serialize the layer.
MultiplyMerge(const MultiplyMerge &layer)
Copy Constructor.
MultiplyMergeType * Clone() const
Clone the MultiplyMergeType object. This handles polymorphism correctly.
void Backward(const InputType &, const OutputType &gy, OutputType &g)
Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backw...
MultiplyMerge & operator=(const MultiplyMerge &layer)
Copy assignment operator.
~MultiplyMergeType()
Destructor to release allocated memory.