Function torch::nn::init::orthogonal_

Function Documentation

Tensor torch::nn::init::orthogonal_(Tensor tensor, double gain = 1.0)

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. No gradient will be recorded for this operation.


Access comprehensive developer documentation for PyTorch

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources