class chainer.initializers.Orthogonal(scale=1.1, dtype=None, mode='auto')[source]

Initializes array with an orthogonal system.

This initializer first makes a matrix of the same shape as the array to be initialized whose elements are drawn independently from standard Gaussian distribution. Next, it applies QR decomposition to (the transpose of) the matrix. To make the decomposition (almost surely) unique, we require the diagonal of the triangular matrix R to be non-negative (see e.g. Edelman & Rao, Then, it initializes the array with the (semi-)orthogonal matrix Q. Finally, the array is multiplied by the constant scale.

If the ndim of the input array is more than 2, we consider the array to be a matrix by concatenating all axes except the first one.

The number of vectors consisting of the orthogonal system (i.e. first element of the shape of the array) must be equal to or smaller than the dimension of each vector (i.e. second element of the shape of the array).

  • scale (float) – A constant to be multiplied by.

  • dtype – Data type specifier.

  • mode (str) – Assertion on the initialized shape. 'auto' (default), 'projection' (before v7), 'embedding', or 'basis'.

Reference: Saxe et al.,



Initializes given array.

This method destructively changes the value of array. The derived class is required to implement this method. The algorithms used to make the new values depend on the concrete derived classes.


array (N-dimensional array) – An array to be initialized by this initializer.