The alpha - dropout layer is a regularizer that randomly with probability 'ratio' sets input values to alphaDash. More...
Public Member Functions | |
AlphaDropout (const double ratio=0.5, const double alphaDash=-alpha *lambda) | |
Create the Alpha_Dropout object using the specified ratio. More... | |
double | A () const |
Value to be multiplied with x for affine transformation. More... | |
double | AlphaDash () const |
Value of alphaDash. More... | |
double | B () const |
Value to be added to a*x for affine transformation. More... | |
template < typename eT > | |
void | Backward (const arma::Mat< eT > &&, arma::Mat< eT > &&gy, arma::Mat< eT > &&g) |
Ordinary feed backward pass of the alpha_dropout layer. More... | |
OutputDataType const & | Delta () const |
Get the detla. More... | |
OutputDataType & | Delta () |
Modify the delta. More... | |
bool | Deterministic () const |
The value of the deterministic parameter. More... | |
bool & | Deterministic () |
Modify the value of the deterministic parameter. More... | |
template < typename eT > | |
void | Forward (const arma::Mat< eT > &&input, arma::Mat< eT > &&output) |
Ordinary feed forward pass of the alpha_dropout layer. More... | |
OutputDataType const & | Mask () const |
Get the mask. More... | |
OutputDataType const & | OutputParameter () const |
Get the output parameter. More... | |
OutputDataType & | OutputParameter () |
Modify the output parameter. More... | |
double | Ratio () const |
The probability of setting a value to alphaDash. More... | |
void | Ratio (const double r) |
Modify the probability of setting a value to alphaDash. More... | |
template < typename Archive > | |
void | serialize (Archive &ar, const unsigned int) |
Serialize the layer. More... | |
The alpha - dropout layer is a regularizer that randomly with probability 'ratio' sets input values to alphaDash.
The alpha - dropout layer is mostly used for SELU activation function where successive layers don't have same mean and variance.
For more information, see the following.
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 49 of file alpha_dropout.hpp.
AlphaDropout | ( | const double | ratio = 0.5 , |
const double | alphaDash = -alpha *lambda |
||
) |
Create the Alpha_Dropout object using the specified ratio.
ratio | The probability of setting a value to alphaDash. |
alphaDash | The dropout scaling parameter. |
|
inline |
Value to be multiplied with x for affine transformation.
Definition at line 101 of file alpha_dropout.hpp.
|
inline |
Value of alphaDash.
Definition at line 107 of file alpha_dropout.hpp.
|
inline |
Value to be added to a*x for affine transformation.
Definition at line 104 of file alpha_dropout.hpp.
void Backward | ( | const arma::Mat< eT > && | , |
arma::Mat< eT > && | gy, | ||
arma::Mat< eT > && | g | ||
) |
Ordinary feed backward pass of the alpha_dropout layer.
input | The propagated input activation. |
gy | The backpropagated error. |
g | The calculated gradient. |
|
inline |
Get the detla.
Definition at line 88 of file alpha_dropout.hpp.
|
inline |
Modify the delta.
Definition at line 90 of file alpha_dropout.hpp.
|
inline |
The value of the deterministic parameter.
Definition at line 93 of file alpha_dropout.hpp.
|
inline |
Modify the value of the deterministic parameter.
Definition at line 95 of file alpha_dropout.hpp.
void Forward | ( | const arma::Mat< eT > && | input, |
arma::Mat< eT > && | output | ||
) |
Ordinary feed forward pass of the alpha_dropout layer.
input | Input data used for evaluating the specified function. |
output | Resulting output activation. |
|
inline |
Get the mask.
Definition at line 110 of file alpha_dropout.hpp.
|
inline |
Get the output parameter.
Definition at line 83 of file alpha_dropout.hpp.
|
inline |
Modify the output parameter.
Definition at line 85 of file alpha_dropout.hpp.
|
inline |
The probability of setting a value to alphaDash.
Definition at line 98 of file alpha_dropout.hpp.
|
inline |
Modify the probability of setting a value to alphaDash.
As 'a' and 'b' depend on 'ratio', modify them as well.
Definition at line 114 of file alpha_dropout.hpp.
References AlphaDropout< InputDataType, OutputDataType >::serialize().
void serialize | ( | Archive & | ar, |
const unsigned | int | ||
) |
Serialize the layer.
Referenced by AlphaDropout< InputDataType, OutputDataType >::Ratio().