Truncated normal initialization
Fills the input Tensor with values drawn from a truncated normal distribution.
nn_init_trunc_normal_(tensor, mean = 0, std = 1, a = -2, b = 2)
tensor
: an n-dimensional Tensormean
: the mean of the normal distributionstd
: the standard deviation of the normal distributiona
: the minimum cutoff valueb
: the maximum cutoff valueif (torch_is_installed()) { w <- torch_empty(3, 5) nn_init_trunc_normal_(w) }
Useful links