23 #ifndef MLPACK_METHODS_ANN_LAYER_CELU_HPP 24 #define MLPACK_METHODS_ANN_LAYER_CELU_HPP 57 typename InputDataType = arma::mat,
58 typename OutputDataType = arma::mat
70 CELU(
const double alpha = 1.0);
79 template<
typename InputType,
typename OutputType>
80 void Forward(
const InputType& input, OutputType& output);
91 template<
typename DataType>
92 void Backward(
const DataType& input,
const DataType& gy, DataType& g);
100 OutputDataType
const&
Delta()
const {
return delta; }
102 OutputDataType&
Delta() {
return delta; }
105 double const&
Alpha()
const {
return alpha; }
120 template<
typename Archive>
121 void serialize(Archive& ar,
const uint32_t );
125 OutputDataType delta;
128 OutputDataType outputParameter;
131 arma::mat derivative;
bool Deterministic() const
Get the value of deterministic parameter.
Definition: celu.hpp:110
CELU(const double alpha=1.0)
Create the CELU object using the specified parameter.
Definition: celu_impl.hpp:22
OutputDataType const & OutputParameter() const
Get the output parameter.
Definition: celu.hpp:95
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: cv.hpp:1
The core includes that mlpack expects; standard C++ includes and Armadillo.
size_t WeightSize()
Get size of weights.
Definition: celu.hpp:115
void Forward(const InputType &input, OutputType &output)
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activ...
Definition: celu_impl.hpp:35
OutputDataType & OutputParameter()
Modify the output parameter.
Definition: celu.hpp:97
bool & Deterministic()
Modify the value of deterministic parameter.
Definition: celu.hpp:112
double const & Alpha() const
Get the non zero gradient.
Definition: celu.hpp:105
double & Alpha()
Modify the non zero gradient.
Definition: celu.hpp:107
OutputDataType const & Delta() const
Get the delta.
Definition: celu.hpp:100
void serialize(Archive &ar, const uint32_t)
Serialize the layer.
Definition: celu_impl.hpp:66
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...
Definition: celu_impl.hpp:58
The CELU activation function, defined by.
Definition: celu.hpp:60
OutputDataType & Delta()
Modify the delta.
Definition: celu.hpp:102