13 #ifndef MLPACK_METHODS_ANN_LAYER_MULTIPLY_CONSTANT_HPP 14 #define MLPACK_METHODS_ANN_LAYER_MULTIPLY_CONSTANT_HPP 31 typename InputDataType = arma::mat,
32 typename OutputDataType = arma::mat
49 template<
typename InputType,
typename OutputType>
50 void Forward(
const InputType&& input, OutputType&& output);
60 template<
typename DataType>
61 void Backward(
const DataType&& , DataType&& gy, DataType&& g);
74 OutputDataType&
Delta()
const {
return delta; }
76 OutputDataType&
Delta() {
return delta; }
81 template<
typename Archive>
82 void serialize(Archive& ar,
const unsigned int );
92 InputDataType inputParameter;
95 OutputDataType outputParameter;
102 #include "multiply_constant_impl.hpp" OutputDataType & OutputParameter()
Modify the output parameter.
InputDataType & InputParameter() const
Get the input parameter.
void Forward(const InputType &&input, OutputType &&output)
Ordinary feed forward pass of a neural network.
OutputDataType & Delta()
Modify the delta.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void Backward(const DataType &&, DataType &&gy, DataType &&g)
Ordinary feed backward pass of a neural network.
OutputDataType & OutputParameter() const
Get the output parameter.
OutputDataType & Delta() const
Get the delta.
InputDataType & InputParameter()
Modify the input parameter.
MultiplyConstant(const double scalar=1.0)
Create the MultiplyConstant object.
Implementation of the multiply constant layer.
void serialize(Archive &ar, const unsigned int)
Serialize the layer.