|
mlpack
master
|
The ELU activation function, defined by. More...
Public Member Functions | |
| ELU (const double alpha=1.0) | |
| Create the ELU object using the specified parameters. More... | |
| double const & | Alpha () const |
| Get the non zero gradient. More... | |
| double & | Alpha () |
| Modify the non zero gradient. More... | |
| template<typename DataType > | |
| 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 backwards through f. More... | |
| OutputDataType const & | Delta () const |
| Get the delta. More... | |
| OutputDataType & | Delta () |
| Modify the delta. More... | |
| template<typename InputType , typename OutputType > | |
| void | Forward (const InputType &&input, OutputType &&output) |
| Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f. More... | |
| InputDataType const & | InputParameter () const |
| Get the input parameter. More... | |
| InputDataType & | InputParameter () |
| Modify the input parameter. More... | |
| OutputDataType const & | OutputParameter () const |
| Get the output parameter. More... | |
| OutputDataType & | OutputParameter () |
| Modify the output parameter. More... | |
| template<typename Archive > | |
| void | Serialize (Archive &ar, const unsigned int) |
| Serialize the layer. More... | |
Private Member Functions | |
| double | Deriv (const double y) |
| Computes the first derivative of the ELU function. More... | |
| template<typename InputType , typename OutputType > | |
| void | Deriv (const InputType &x, OutputType &y) |
| Computes the first derivative of the ELU function. More... | |
| double | fn (const double x) |
| Computes the ELU function. More... | |
| template<typename eT > | |
| void | fn (const arma::Mat< eT > &x, arma::Mat< eT > &y) |
| Computes the ELU function using a dense matrix as input. More... | |
Private Attributes | |
| double | alpha |
| ELU Hyperparameter (0 < alpha) More... | |
| OutputDataType | delta |
| Locally-stored delta object. More... | |
| InputDataType | inputParameter |
| Locally-stored input parameter object. More... | |
| OutputDataType | outputParameter |
| Locally-stored output parameter object. More... | |
The ELU activation function, defined by.
| InputDataType | Type of the input data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
| OutputDataType | Type of the output data (arma::colvec, arma::mat, arma::sp_mat or arma::cube). |
| mlpack::ann::ELU< InputDataType, OutputDataType >::ELU | ( | const double | alpha = 1.0 | ) |
|
inline |
Get the non zero gradient.
Definition at line 111 of file elu.hpp.
References mlpack::ann::ELU< InputDataType, OutputDataType >::alpha.
|
inline |
Modify the non zero gradient.
Definition at line 113 of file elu.hpp.
References mlpack::ann::ELU< InputDataType, OutputDataType >::alpha, and mlpack::ann::ELU< InputDataType, OutputDataType >::Serialize().
| void mlpack::ann::ELU< InputDataType, OutputDataType >::Backward | ( | const DataType && | input, |
| DataType && | gy, | ||
| DataType && | g | ||
| ) |
Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backwards through f.
Using the results from the feed forward pass.
| input | The propagated input activation. |
| gy | The backpropagated error. |
| g | The calculated gradient. |
|
inline |
Get the delta.
Definition at line 106 of file elu.hpp.
References mlpack::ann::ELU< InputDataType, OutputDataType >::delta.
|
inline |
Modify the delta.
Definition at line 108 of file elu.hpp.
References mlpack::ann::ELU< InputDataType, OutputDataType >::delta.
|
inlineprivate |
Computes the first derivative of the ELU function.
| x | Input data. |
Definition at line 158 of file elu.hpp.
References mlpack::ann::ELU< InputDataType, OutputDataType >::alpha.
Referenced by mlpack::ann::ELU< InputDataType, OutputDataType >::Deriv().
|
inlineprivate |
Computes the first derivative of the ELU function.
| y | Input activations. |
| x | The resulting derivatives. |
Definition at line 171 of file elu.hpp.
References mlpack::ann::ELU< InputDataType, OutputDataType >::Deriv().
|
inlineprivate |
Computes the ELU function.
| x | Input data. |
Definition at line 128 of file elu.hpp.
References mlpack::ann::ELU< InputDataType, OutputDataType >::alpha.
Referenced by mlpack::ann::ELU< InputDataType, OutputDataType >::fn().
|
inlineprivate |
Computes the ELU function using a dense matrix as input.
| x | Input data. |
| y | The resulting output activation. |
Definition at line 142 of file elu.hpp.
References mlpack::ann::ELU< InputDataType, OutputDataType >::fn().
| void mlpack::ann::ELU< InputDataType, OutputDataType >::Forward | ( | const InputType && | input, |
| OutputType && | output | ||
| ) |
Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activity forward through f.
| input | Input data used for evaluating the specified function. |
| output | Resulting output activation. |
|
inline |
Get the input parameter.
Definition at line 96 of file elu.hpp.
References mlpack::ann::ELU< InputDataType, OutputDataType >::inputParameter.
|
inline |
Modify the input parameter.
Definition at line 98 of file elu.hpp.
References mlpack::ann::ELU< InputDataType, OutputDataType >::inputParameter.
|
inline |
Get the output parameter.
Definition at line 101 of file elu.hpp.
References mlpack::ann::ELU< InputDataType, OutputDataType >::outputParameter.
|
inline |
Modify the output parameter.
Definition at line 103 of file elu.hpp.
References mlpack::ann::ELU< InputDataType, OutputDataType >::outputParameter.
| void mlpack::ann::ELU< InputDataType, OutputDataType >::Serialize | ( | Archive & | ar, |
| const unsigned | int | ||
| ) |
Serialize the layer.
Referenced by mlpack::ann::ELU< InputDataType, OutputDataType >::Alpha().
|
private |
ELU Hyperparameter (0 < alpha)
Definition at line 191 of file elu.hpp.
Referenced by mlpack::ann::ELU< InputDataType, OutputDataType >::Alpha(), mlpack::ann::ELU< InputDataType, OutputDataType >::Deriv(), and mlpack::ann::ELU< InputDataType, OutputDataType >::fn().
|
private |
Locally-stored delta object.
Definition at line 182 of file elu.hpp.
Referenced by mlpack::ann::ELU< InputDataType, OutputDataType >::Delta().
|
private |
Locally-stored input parameter object.
Definition at line 185 of file elu.hpp.
Referenced by mlpack::ann::ELU< InputDataType, OutputDataType >::InputParameter().
|
private |
Locally-stored output parameter object.
Definition at line 188 of file elu.hpp.
Referenced by mlpack::ann::ELU< InputDataType, OutputDataType >::OutputParameter().
1.8.11