giagrad.Tensor.orthogonal#

Tensor.orthogonal(gain=1.0) Tensor[source]#

Fills Tensor data with a (semi) orthogonal matrix.

Values are generated according to the method described in Exact solutions to the nonlinear dynamics of learning in deep linear neural networks - Saxe, A. et al. (2013). The Tensor must have at least 2 dimensions, and for Tensors with more than 2 dimensions the trailing dimensions are flattened.

Parameters:

gain (float) – Optional scaling factor.

Examples

>>> Tensor.empty(3, 5).orthogonal()