Rate 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 am×nm \times n matrixC (given byother) with a matrixQ,whereQ is represented using Householder reflectors(input, tau).SeeRepresentation of Orthogonal or Unitary Matrices for further details.

Ifleft isTrue thenop(Q) timesC is computed, otherwise the result isC timesop(Q).Whenleft isTrue, the implicit matrixQ has sizem×mm \times m.It has sizen×nn \times n otherwise.Iftranspose isTrue 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 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 matrixQ is conjugate transposed or not.

Keyword Arguments:

out (Tensor,optional) – the output Tensor. Ignored ifNone. Default:None.