GlorotInitializationType< Uniform > Class Template Reference

This class is used to initialize the weight matrix with the Glorot Initialization method. More...

Public Member Functions

 GlorotInitializationType ()
 Initialize the Glorot initialization object. More...

 
template
<
typename
eT
>
void Initialize (arma::Mat< eT > &W, const size_t rows, const size_t cols)
 Initialize the elements weight matrix with glorot initialization method. More...

 
template
<
typename
eT
>
void Initialize (arma::Cube< eT > &W, const size_t rows, const size_t cols, const size_t slices)
 Initialize the elements of the specified weight 3rd order tensor with glorot initialization method. More...

 
template
<
>
void Initialize (arma::Mat< eT > &W, const size_t rows, const size_t cols)
 
template
<
>
void Initialize (arma::Mat< eT > &W, const size_t rows, const size_t cols)
 

Detailed Description


template<bool Uniform = true>
class mlpack::ann::GlorotInitializationType< Uniform >

This class is used to initialize the weight matrix with the Glorot Initialization method.

The method is defined by

\begin{eqnarray*} \mathrm{Var}[w_i] &=& \frac{2}{n_i + n_{i+1}} \\ w_i \sim \mathrm{U}[-\frac{\sqrt{6}}{\sqrt{n_i + n_{i+1}}}, \frac{\sqrt{6}}{\sqrt{n_i + n_{i+1}}}] \end{eqnarray*}

where $ n_{i+1} $ is the number of neurons in the outgoing layer, $ n_i $ represents the number of neurons in the ingoing layer. Here Normal Distribution may also be used if needed

For more information, see the following paper.

@inproceedings {pmlr-v9-glorot10a,
title = {Understanding the difficulty of training
deep feedforward neural networks},
author = {Xavier Glorot and Yoshua Bengio},
booktitle = {Proceedings of the Thirteenth International Conference
on Artificial Intelligence and Statistics},
year = {2010}
}

Definition at line 55 of file glorot_init.hpp.

Constructor & Destructor Documentation

◆ GlorotInitializationType()

Initialize the Glorot initialization object.

Definition at line 61 of file glorot_init.hpp.

Member Function Documentation

◆ Initialize() [1/4]

void Initialize ( arma::Mat< eT > &  W,
const size_t  rows,
const size_t  cols 
)

Initialize the elements weight matrix with glorot initialization method.

Parameters
WWeight matrix to initialize.
rowsNumber of rows.
colsNumber of columns.

◆ Initialize() [2/4]

void Initialize ( arma::Cube< eT > &  W,
const size_t  rows,
const size_t  cols,
const size_t  slices 
)
inline

Initialize the elements of the specified weight 3rd order tensor with glorot initialization method.

Parameters
WWeight matrix to initialize.
rowsNumber of rows.
colsNumber of columns.
sliceNumbers of slices.

Definition at line 125 of file glorot_init.hpp.

◆ Initialize() [3/4]

void Initialize ( arma::Mat< eT > &  W,
const size_t  rows,
const size_t  cols 
)
inline

Definition at line 96 of file glorot_init.hpp.

References GaussianInitialization::Initialize().

◆ Initialize() [4/4]

void Initialize ( arma::Mat< eT > &  W,
const size_t  rows,
const size_t  cols 
)
inline

Definition at line 110 of file glorot_init.hpp.

References RandomInitialization::Initialize().


The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-3.2.1/src/mlpack/methods/ann/init_rules/glorot_init.hpp