12 #ifndef MLPACK_METHODS_ANN_LAYER_C_RELU_HPP 13 #define MLPACK_METHODS_ANN_LAYER_C_RELU_HPP 47 typename InputDataType = arma::mat,
48 typename OutputDataType = arma::mat
66 template<
typename InputType,
typename OutputType>
67 void Forward(
const InputType& input, OutputType& output);
78 template<
typename DataType>
79 void Backward(
const DataType& input,
const DataType& gy, DataType& g);
87 OutputDataType
const&
Delta()
const {
return delta; }
89 OutputDataType&
Delta() {
return delta; }
97 template<
typename Archive>
98 void serialize(Archive& ,
const uint32_t );
102 OutputDataType delta;
105 OutputDataType outputParameter;
112 #include "c_relu_impl.hpp" size_t WeightSize() const
Get size of weights.
CReLU()
Create the CReLU object.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
void serialize(Archive &, const uint32_t)
Serialize the layer.
void Backward(const DataType &input, const 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.
void Forward(const InputType &input, OutputType &output)
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activ...
OutputDataType const & OutputParameter() const
Get the output parameter.