Fills the input Tensor with a (semi) orthogonal matrix, as
described in Exact solutions to the nonlinear dynamics of learning in deep linear neural networks - Saxe, A. et al. (2013). The input tensor must have
at least 2 dimensions, and for tensors with more than 2 dimensions the
trailing dimensions are flattened.
Examples
if (torch_is_installed()) {
w <- torch_empty(3, 5)
nn_init_orthogonal_(w)
}
#> torch_tensor
#> -0.8462 -0.2441 -0.2736 -0.3863 -0.0154
#> -0.3067 0.2671 -0.3117 0.7411 -0.4339
#> -0.1462 -0.4409 0.7215 0.1079 -0.5021
#> [ CPUFloatType{3,5} ]