13 #ifndef MLPACK_METHODS_ANN_LAYER_CONSTANT_HPP 14 #define MLPACK_METHODS_ANN_LAYER_CONSTANT_HPP 31 typename InputDataType = arma::mat,
32 typename OutputDataType = arma::mat
53 template<
typename InputType,
typename OutputType>
54 void Forward(
const InputType&& input, OutputType&& output);
64 template<
typename DataType>
87 template<
typename Archive>
88 void Serialize(Archive& ar,
const unsigned int );
114 #include "constant_impl.hpp" InputDataType & InputParameter()
Modify the input parameter.
void Serialize(Archive &ar, const unsigned int)
Serialize the layer.
OutputDataType & OutputParameter()
Modify the output parameter.
Linear algebra utility functions, generally performed on matrices or vectors.
size_t inSize
Locally-stored number of input units.
OutputDataType delta
Locally-stored delta object.
OutputDataType & Delta()
Modify the delta.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void Backward(const DataType &&, DataType &&, DataType &&g)
Ordinary feed backward pass of a neural network.
OutputDataType outputParameter
Locally-stored output parameter object.
OutputDataType constantOutput
Locally-stored constant output matrix.
Constant(const size_t outSize, const double scalar)
Create the Constant object that outputs a given constant scalar value given any input value...
InputDataType inputParameter
Locally-stored input parameter object.
InputDataType & InputParameter() const
Get the input parameter.
OutputDataType & OutputParameter() const
Get the output parameter.
void Forward(const InputType &&input, OutputType &&output)
Ordinary feed forward pass of a neural network.
Implementation of the constant layer.
size_t outSize
Locally-stored number of output units.
OutputDataType & Delta() const
Get the delta.