12 #ifndef MLPACK_METHODS_ANN_LAYER_C_RELU_HPP 13 #define MLPACK_METHODS_ANN_LAYER_C_RELU_HPP 46 typename InputDataType = arma::mat,
47 typename OutputDataType = arma::mat
65 template<
typename InputType,
typename OutputType>
66 void Forward(
const InputType&& input, OutputType&& output);
77 template<
typename DataType>
78 void Backward(
const DataType&& input, DataType&& gy, DataType&& g);
86 OutputDataType
const&
Delta()
const {
return delta; }
88 OutputDataType&
Delta() {
return delta; }
93 template<
typename Archive>
94 void serialize(Archive& ,
const unsigned int );
101 OutputDataType outputParameter;
108 #include "c_relu_impl.hpp" CReLU()
Create the CReLU object.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void Forward(const InputType &&input, OutputType &&output)
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activ...
void serialize(Archive &, const unsigned int)
Serialize the layer.
void Backward(const DataType &&input, DataType &&gy, DataType &&g)
Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backw...
A concatenated ReLU has two outputs, one ReLU and one negative ReLU, concatenated together...
OutputDataType const & Delta() const
Get the delta.
OutputDataType & OutputParameter()
Modify the output parameter.
OutputDataType & Delta()
Modify the delta.
OutputDataType const & OutputParameter() const
Get the output parameter.