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.6792 -0.3949 0.0864 -0.5046 -0.3473
#> 0.5942 -0.3843 0.6025 -0.3665 -0.0429
#> -0.2023 -0.0382 0.5620 0.6847 -0.4159
#> [ CPUFloatType{3,5} ]