8 #ifndef MLPACK_METHODS_ANN_LAYER_MULTIPLY_CONSTANT_HPP 9 #define MLPACK_METHODS_ANN_LAYER_MULTIPLY_CONSTANT_HPP 26 typename InputDataType = arma::mat,
27 typename OutputDataType = arma::mat
44 template<
typename InputType,
typename OutputType>
45 void Forward(
const InputType&& input, OutputType&& output);
55 template<
typename DataType>
56 void Backward(
const DataType&& , DataType&& gy, DataType&& g);
76 template<
typename Archive>
77 void Serialize(Archive& ar,
const unsigned int );
97 #include "multiply_constant_impl.hpp" Linear algebra utility functions, generally performed on matrices or vectors.
InputDataType & InputParameter()
Modify the input parameter.
The core includes that mlpack expects; standard C++ includes and Armadillo.
OutputDataType & OutputParameter() const
Get the output parameter.
OutputDataType & Delta()
Modify the delta.
OutputDataType & OutputParameter()
Modify the output parameter.
MultiplyConstant(const double scalar)
Create the MultiplyConstant object.
void Forward(const InputType &&input, OutputType &&output)
Ordinary feed forward pass of a neural network.
OutputDataType delta
Locally-stored delta object.
InputDataType & InputParameter() const
Get the input parameter.
void Serialize(Archive &ar, const unsigned int)
Serialize the layer.
OutputDataType outputParameter
Locally-stored output parameter object.
Implementation of the multiply constant layer.
InputDataType inputParameter
Locally-stored input parameter object.
const double scalar
Locally-stored constant scalar value.
OutputDataType & Delta() const
Get the delta.
void Backward(const DataType &&, DataType &&gy, DataType &&g)
Ordinary feed backward pass of a neural network.