Fills the input Tensor with values drawn from a truncated normal distribution.
Examples
if (torch_is_installed()) {
w <- torch_empty(3, 5)
nn_init_trunc_normal_(w)
}
#> torch_tensor
#> -0.7527 0.3771 -1.2495 -0.2431 0.8773
#> -1.0118 1.0828 -1.3777 0.1028 -0.6785
#> 0.3834 0.4042 -0.4491 -1.1887 1.1607
#> [ CPUFloatType{3,5} ]