Fills the input Tensor with values drawn from the normal distribution
Arguments
- tensor
an n-dimensional Tensor
- mean
the mean of the normal distribution
- std
the standard deviation of the normal distribution
Examples
if (torch_is_installed()) {
w <- torch_empty(3, 5)
nn_init_normal_(w)
}
#> torch_tensor
#> 0.6877 -0.2963 -0.6825 0.5468 -1.1005
#> 0.4432 -0.0640 0.7375 -0.2872 1.0395
#> 0.1714 -0.2307 -1.7791 1.2920 2.8048
#> [ CPUFloatType{3,5} ]