chainerx.linalg.qr¶
-
chainerx.linalg.
qr
(a, mode='reduced')¶ Compute the qr factorization of a matrix.
Factor the matrix
a
as qr, whereq
is orthonormal andr
is upper-triangular.- Parameters
a (ndarray) – Matrix to be factored.
mode (str) – The mode of decomposition. ‘reduced’ : returns q, r with dimensions (M, K), (K, N) (default) ‘complete’ : returns q, r with dimensions (M, M), (M, N) ‘r’ : returns r only with dimensions (K, N) ‘raw’ : returns h, tau with dimensions (N, M), (K,), where
(M, N)
is the shape of the input matrix andK = min(M, N)
- Returns
A matrix with orthonormal columns. r (~chainerx.ndarray): The upper-triangular matrix.
- Return type
q (ndarray)
Note
The
dtype
must befloat32
orfloat64
(float16
is not supported yet.)Backpropagation is not implemented for non-square output matrix
r
.Backpropagation is not implemented for ‘r’ or ‘raw’ modes.
See also