chainer.initializers.Orthogonal

class chainer.initializers.Orthogonal(scale=1.1, dtype=None)[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 Singular Value Decomposition (SVD) to the matrix. Then, it initializes the array with either side of resultant orthogonal matrices, depending on the shape of the input array. 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).

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

  • dtype – Data type specifier.

Reference: Saxe et al., https://arxiv.org/abs/1312.6120

Methods

__call__(array)[source]

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.

Parameters

array (numpy.ndarray or cupy.ndarray) – An array to be initialized by this initializer.