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 matrixC (given by
other) with a matrixQ,whereQ is represented using Householder reflectors(input, tau).SeeRepresentation of Orthogonal or Unitary Matrices for further details.If
leftisTrue thenop(Q) timesC is computed, otherwise the result isC timesop(Q).WhenleftisTrue, the implicit matrixQ has size.It has size otherwise.IftransposeisTrue thenop is 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 gradientsand/ortau.size(-1)is very small.``- Parameters:
input (Tensor) – tensor of shape(*, mn, k) where* is zero or more batch dimensionsandmn equals tom orn depending on the
left.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 matrixQ is conjugate transposed or not.
- Keyword Arguments:
out (Tensor,optional) – the output Tensor. Ignored ifNone. Default:None.