13 #ifndef MLPACK_METHODS_ANN_LAYER_SEQUENTIAL_HPP 14 #define MLPACK_METHODS_ANN_LAYER_SEQUENTIAL_HPP 57 typename InputType = arma::mat,
58 typename OutputType = arma::mat,
96 void Forward(
const InputType& input, OutputType& output);
108 const OutputType& gy,
118 void Gradient(
const InputType& input,
119 const OutputType& error,
127 template<
typename Archive>
128 void serialize(Archive& ar,
const uint32_t );
148 #include "sequential_impl.hpp" ~SequentialType()
Destroy the Sequential object.
SequentialType * Clone() const
Clone the SequentialType object. This handles polymorphism correctly.
Linear algebra utility functions, generally performed on matrices or vectors.
void serialize(Archive &ar, const uint32_t)
Serialize the layer.
Implementation of the Sequential class.
The core includes that mlpack expects; standard C++ includes and Armadillo.
SequentialType()
Create the Sequential object.
void Backward(const InputType &, const OutputType &gy, OutputType &g)
Ordinary feed backward pass of a neural network, using 3rd-order tensors as input, calculating the function f(x) by propagating x backwards through f.
SequentialType< arma::mat, arma::mat, true > Residual
A "multi-layer" is a layer that is a wrapper around other layers.
void Forward(const InputType &input, OutputType &output)
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activ...
size_t InputShape() const
SequentialType & operator=(const SequentialType &layer)
Copy assignment operator.
SequentialType< arma::mat, arma::mat, false > Sequential
void Gradient(const InputType &input, const OutputType &error, OutputType &)
Calculate the gradient using the output delta and the input activation.