nn_init_xavier_normal_ {torch} | R Documentation |
Xavier normal initialization
Description
Fills the input Tensor
with values according to the method
described in Understanding the difficulty of training deep feedforward neural networks
- Glorot, X. & Bengio, Y. (2010), using a normal
distribution.
Usage
nn_init_xavier_normal_(tensor, gain = 1)
Arguments
tensor |
an n-dimensional |
gain |
an optional scaling factor |
Examples
if (torch_is_installed()) {
w <- torch_empty(3, 5)
nn_init_xavier_normal_(w)
}
[Package torch version 0.13.0 Index]