On this page
torch.ormqr
torch.ormqr(input, tau, other, left=True, transpose=False, *, out=None) → Tensor-
Computes the matrix-matrix multiplication of a product of Householder matrices with a general matrix.
Multiplies a matrix
C(given byother) with a matrixQ, whereQis represented using Householder reflectors(input, tau). See Representation of Orthogonal or Unitary Matrices for further details.If
leftisTruethenop(Q)timesCis computed, otherwise the result isCtimesop(Q). WhenleftisTrue, the implicit matrixQhas size . It has size otherwise. IftransposeisTruethenopis the conjugate transpose operation, otherwise it’s a no-op.Supports inputs of float, double, cfloat and cdouble dtypes. Also supports batched inputs, and, if the input is batched, the output is batched with the same dimensions.
See also
torch.geqrf()can be used to form the Householder representation(input, tau)of matrixQfrom the QR decomposition.Note
This function supports backward but it is only fast when
(input, tau)do not require gradients and/ortau.size(-1)is very small. ``- Parameters
-
- input (Tensor) – tensor of shape
(*, mn, k)where*is zero or more batch dimensions andmnequals tomorndepending on theleft. - tau (Tensor) – tensor of shape
(*, min(mn, k))where*is zero or more batch dimensions. - other (Tensor) – tensor of shape
(*, m, n)where*is zero or more batch dimensions. - left (bool) – controls the order of multiplication.
- transpose (bool) – controls whether the matrix
Qis conjugate transposed or not.
- input (Tensor) – tensor of shape
- Keyword Arguments
-
out (Tensor, optional) – the output Tensor. Ignored if
None. Default:None.
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.ormqr.html