24#ifndef MLPACK_METHODS_ANN_LAYER_ELU_HPP
25#define MLPACK_METHODS_ANN_LAYER_ELU_HPP
108 typename InputDataType = arma::mat,
109 typename OutputDataType = arma::mat
138 template<
typename InputType,
typename OutputType>
139 void Forward(
const InputType& input, OutputType& output);
150 template<
typename DataType>
151 void Backward(
const DataType& input,
const DataType& gy, DataType& g);
159 OutputDataType
const&
Delta()
const {
return delta; }
161 OutputDataType&
Delta() {
return delta; }
164 double const&
Alpha()
const {
return alpha; }
174 double const&
Lambda()
const {
return lambda; }
179 template<
typename Archive>
184 OutputDataType delta;
187 OutputDataType outputParameter;
190 arma::mat derivative;
213#include "elu_impl.hpp"
The ELU activation function, defined by.
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 & Delta() const
Get the delta.
ELU(const double alpha)
Create the ELU object using the specified parameter.
double & Alpha()
Modify the non zero gradient.
OutputDataType const & OutputParameter() const
Get the output parameter.
double const & Lambda() const
Get the lambda parameter.
bool & Deterministic()
Modify the value of deterministic parameter.
bool Deterministic() const
Get the value of deterministic parameter.
ELU()
Create the ELU object.
OutputDataType & OutputParameter()
Modify the output parameter.
double const & Alpha() const
Get the non zero gradient.
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...
void serialize(Archive &ar, const unsigned int)
Serialize the layer.
OutputDataType & Delta()
Modify the delta.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.