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::Mat< eT > &W)
 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
<
typename
eT
>
void Initialize (arma::Cube< eT > &W)
 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)
 
template
<
>
void Initialize (arma::Mat< eT > &W, const size_t rows, const size_t cols)
 
template
<
>
void Initialize (arma::Mat< eT > &W)
 

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/8]

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/8]

void Initialize ( arma::Mat< eT > &  W)

Initialize the elements weight matrix with glorot initialization method.

Parameters
WWeight matrix to initialize.

◆ Initialize() [3/8]

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.
slicesNumber of slices.

Definition at line 167 of file glorot_init.hpp.

◆ Initialize() [4/8]

void Initialize ( arma::Cube< eT > &  W)
inline

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

Parameters
WWeight matrix to initialize.

Definition at line 181 of file glorot_init.hpp.

References Log::Fatal.

◆ Initialize() [5/8]

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

Definition at line 113 of file glorot_init.hpp.

References GaussianInitialization::Initialize().

◆ Initialize() [6/8]

void Initialize ( arma::Mat< eT > &  W)
inline

Definition at line 127 of file glorot_init.hpp.

References Log::Fatal, and GaussianInitialization::Initialize().

◆ Initialize() [7/8]

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

Definition at line 139 of file glorot_init.hpp.

References RandomInitialization::Initialize().

◆ Initialize() [8/8]

void Initialize ( arma::Mat< eT > &  W)
inline

Definition at line 154 of file glorot_init.hpp.

References Log::Fatal, and RandomInitialization::Initialize().


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