The PReLU activation function, defined by (where alpha is trainable)
More...
|
| | PReLU (const double userAlpha=0.03) |
| | Create the PReLU 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...
|
| |
| template<typename eT > |
| void | Gradient (const arma::Mat< eT > &input, const arma::Mat< eT > &error, arma::Mat< eT > &gradient) |
| | Calculate the gradient using the output delta and the input activation. More...
|
| |
| OutputDataType const & | Gradient () const |
| | Get the gradient. More...
|
| |
| OutputDataType & | Gradient () |
| | Modify the gradient. More...
|
| |
| OutputDataType const & | OutputParameter () const |
| | Get the output parameter. More...
|
| |
| OutputDataType & | OutputParameter () |
| | Modify the output parameter. More...
|
| |
| OutputDataType const & | Parameters () const |
| | Get the parameters. More...
|
| |
| OutputDataType & | Parameters () |
| | Modify the parameters. More...
|
| |
| void | Reset () |
| |
| template<typename Archive > |
| void | serialize (Archive &ar, const unsigned int) |
| | Serialize the layer. More...
|
| |
template<typename InputDataType = arma::mat, typename OutputDataType = arma::mat>
class mlpack::ann::PReLU< InputDataType, OutputDataType >
The PReLU activation function, defined by (where alpha is trainable)
- Template Parameters
-
| 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 45 of file parametric_relu.hpp.
| PReLU |
( |
const double |
userAlpha = 0.03 | ) |
|
Create the PReLU object using the specified parameters.
The non zero gradient can be adjusted by specifying tha parameter alpha in the range 0 to 1. Default (alpha = 0.03). This parameter is trainable.
- Parameters
-
| userAlpha | Non zero gradient |
| double const& Alpha |
( |
| ) |
const |
|
inline |
| 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.
- Parameters
-
| input | The propagated input activation. |
| gy | The backpropagated error. |
| g | The calculated gradient. |
| OutputDataType const& Delta |
( |
| ) |
const |
|
inline |
| OutputDataType& Delta |
( |
| ) |
|
|
inline |
| 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.
- Parameters
-
| input | Input data used for evaluating the specified function. |
| output | Resulting output activation. |
| void Gradient |
( |
const arma::Mat< eT > & |
input, |
|
|
const arma::Mat< eT > & |
error, |
|
|
arma::Mat< eT > & |
gradient |
|
) |
| |
Calculate the gradient using the output delta and the input activation.
- Parameters
-
| input | The input parameter used for calculating the gradient. |
| error | The calculated error. |
| gradient | The calculated gradient. |
| OutputDataType const& Gradient |
( |
| ) |
const |
|
inline |
| OutputDataType& Gradient |
( |
| ) |
|
|
inline |
| OutputDataType const& OutputParameter |
( |
| ) |
const |
|
inline |
| OutputDataType& OutputParameter |
( |
| ) |
|
|
inline |
| OutputDataType const& Parameters |
( |
| ) |
const |
|
inline |
| OutputDataType& Parameters |
( |
| ) |
|
|
inline |
| void serialize |
( |
Archive & |
ar, |
|
|
const unsigned |
int |
|
) |
| |
The documentation for this class was generated from the following file: