AlphaDropout< InputDataType, OutputDataType > Class Template Reference

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 > &, const 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 uint32_t)
 Serialize the layer. More...

 

Detailed Description


template
<
typename
InputDataType
=
arma::mat
,
typename
OutputDataType
=
arma::mat
>

class mlpack::ann::AlphaDropout< InputDataType, OutputDataType >

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.

@article{Klambauer2017,
author = {Gunter Klambauer and Thomas Unterthiner and
Andreas Mayr},
title = {Self-Normalizing Neural Networks},
journal = {Advances in Neural Information Processing Systems},
year = {2017},
url = {https://arxiv.org/abs/1706.02515}
}
Template Parameters
InputDataTypeType of the input data (arma::colvec, arma::mat, arma::sp_mat or arma::cube).
OutputDataTypeType of the output data (arma::colvec, arma::mat, arma::sp_mat or arma::cube).

Definition at line 50 of file alpha_dropout.hpp.

Constructor & Destructor Documentation

◆ AlphaDropout()

AlphaDropout ( const double  ratio = 0.5,
const double  alphaDash = -alpha *lambda 
)

Create the Alpha_Dropout object using the specified ratio.

Parameters
ratioThe probability of setting a value to alphaDash.
alphaDashThe dropout scaling parameter.

Member Function Documentation

◆ A()

double A ( ) const
inline

Value to be multiplied with x for affine transformation.

Definition at line 102 of file alpha_dropout.hpp.

◆ AlphaDash()

double AlphaDash ( ) const
inline

Value of alphaDash.

Definition at line 108 of file alpha_dropout.hpp.

◆ B()

double B ( ) const
inline

Value to be added to a*x for affine transformation.

Definition at line 105 of file alpha_dropout.hpp.

◆ Backward()

void Backward ( const arma::Mat< eT > &  ,
const arma::Mat< eT > &  gy,
arma::Mat< eT > &  g 
)

Ordinary feed backward pass of the alpha_dropout layer.

Parameters
*(input) The propagated input activation.
gyThe backpropagated error.
gThe calculated gradient.

◆ Delta() [1/2]

OutputDataType const& Delta ( ) const
inline

Get the detla.

Definition at line 89 of file alpha_dropout.hpp.

◆ Delta() [2/2]

OutputDataType& Delta ( )
inline

Modify the delta.

Definition at line 91 of file alpha_dropout.hpp.

◆ Deterministic() [1/2]

bool Deterministic ( ) const
inline

The value of the deterministic parameter.

Definition at line 94 of file alpha_dropout.hpp.

◆ Deterministic() [2/2]

bool& Deterministic ( )
inline

Modify the value of the deterministic parameter.

Definition at line 96 of file alpha_dropout.hpp.

◆ Forward()

void Forward ( const arma::Mat< eT > &  input,
arma::Mat< eT > &  output 
)

Ordinary feed forward pass of the alpha_dropout layer.

Parameters
inputInput data used for evaluating the specified function.
outputResulting output activation.

◆ Mask()

OutputDataType const& Mask ( ) const
inline

Get the mask.

Definition at line 111 of file alpha_dropout.hpp.

◆ OutputParameter() [1/2]

OutputDataType const& OutputParameter ( ) const
inline

Get the output parameter.

Definition at line 84 of file alpha_dropout.hpp.

◆ OutputParameter() [2/2]

OutputDataType& OutputParameter ( )
inline

Modify the output parameter.

Definition at line 86 of file alpha_dropout.hpp.

◆ Ratio() [1/2]

double Ratio ( ) const
inline

The probability of setting a value to alphaDash.

Definition at line 99 of file alpha_dropout.hpp.

◆ Ratio() [2/2]

void Ratio ( const double  r)
inline

Modify the probability of setting a value to alphaDash.

As 'a' and 'b' depend on 'ratio', modify them as well.

Definition at line 115 of file alpha_dropout.hpp.

References AlphaDropout< InputDataType, OutputDataType >::serialize().

◆ serialize()

void serialize ( Archive &  ar,
const uint32_t   
)

Serialize the layer.

Referenced by AlphaDropout< InputDataType, OutputDataType >::Ratio().


The documentation for this class was generated from the following file:
  • /home/ryan/src/mlpack.org/_src/mlpack-git/src/mlpack/methods/ann/layer/alpha_dropout.hpp