raise ValueError(
"Invalid mode: {}. Choose from {}.".format(
repr(mode),
", ".join(repr(m) for m in _orthogonal_constraints)))
super(Orthogonal, self).__init__(dtype)
// TODO(Kenta Oono)
After Change
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,
https://web.eecs.umich.edu/~rajnrao/Acta05rmt.pdf).
Then, it initializes the array with the (semi-)orthogonal matrix Q.