The LeakyReLU activation function, defined by. More...
Public Member Functions | |
LeakyReLU (const double alpha=0.03) | |
Create the LeakyReLU 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, const 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... | |
OutputDataType const & | OutputParameter () const |
Get the output parameter. More... | |
OutputDataType & | OutputParameter () |
Modify the output parameter. More... | |
template < typename Archive > | |
void | serialize (Archive &ar, const uint32_t) |
Serialize the layer. More... | |
size_t | WeightSize () const |
Get size of weights. More... | |
The LeakyReLU 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). |
Definition at line 44 of file leaky_relu.hpp.
LeakyReLU | ( | const double | alpha = 0.03 | ) |
Create the LeakyReLU object using the specified parameters.
The non zero gradient can be adjusted by specifying the parameter alpha in the range 0 to 1. Default (alpha = 0.03)
alpha | Non zero gradient |
|
inline |
Get the non zero gradient.
Definition at line 89 of file leaky_relu.hpp.
|
inline |
Modify the non zero gradient.
Definition at line 91 of file leaky_relu.hpp.
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 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 84 of file leaky_relu.hpp.
|
inline |
Modify the delta.
Definition at line 86 of file leaky_relu.hpp.
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.
input | Input data used for evaluating the specified function. |
output | Resulting output activation. |
|
inline |
Get the output parameter.
Definition at line 79 of file leaky_relu.hpp.
|
inline |
Modify the output parameter.
Definition at line 81 of file leaky_relu.hpp.
void serialize | ( | Archive & | ar, |
const uint32_t | |||
) |
Serialize the layer.
Referenced by LeakyReLU< InputDataType, OutputDataType >::WeightSize().
|
inline |
Get size of weights.
Definition at line 94 of file leaky_relu.hpp.
References LeakyReLU< InputDataType, OutputDataType >::serialize().