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.4412 0.5151 -0.3445 0.2491 -0.5995
#> -0.4604 0.3823 0.4715 -0.4482 -0.4676
#> -0.2541 0.0941 0.4601 0.8453 -0.0193
#> [ CPUFloatType{3,5} ]