chainerx.linalg.eigh¶
-
chainerx.linalg.
eigh
(a, UPLO='L')¶ Compute the eigenvalues and eigenvectors of a real symmetric matrix.
- Parameters
- Returns
Returns a tuple
(w, v)
.w
contains eigenvalues andv
contains eigenvectors.v[:, i]
is an eigenvector corresponding to an eigenvaluew[i]
.- Return type
tuple of
ndarray
Note
Although
UPLO
can be specified to ignore either the strictly lower or upper part of the input matrix, the backward computation assumes that the inputs is symmetric and the computed gradient is always a symmetric matrix with respect toUPLO
. More specifically, the gradient is computed as if the function is restricted to a Riemannian submanifold of \(R^{n \times n}\) consisting just of symmetric matrices and is faithful to the mathematical definition of the eigenvalue decomposition of symmetric matrices.Note
The
dtype
must befloat32
orfloat64
(float16
is not supported yet.)See also