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.4222 0.7770 0.6715 1.0950 -0.8898
#> 0.7347 -2.3370 0.7088 1.5672 -0.1107
#> 0.1185 -0.2518 1.6978 -0.5799 1.3176
#> [ CPUFloatType{3,5} ]