On this page
torch.geqrf
torch.geqrf(input, *, out=None)-
This is a low-level function for calling LAPACK’s geqrf directly. This function returns a namedtuple (a, tau) as defined in LAPACK documentation for geqrf .
Computes a QR decomposition of
input. BothQandRmatrices are stored in the same output tensora. The elements ofRare stored on and above the diagonal. Elementary reflectors (or Householder vectors) implicitly defining matrixQare stored below the diagonal. The results of this function can be used together withtorch.linalg.householder_product()to obtain theQmatrix or withtorch.ormqr(), which uses an implicit representation of theQmatrix, for an efficient matrix-matrix multiplication.See LAPACK documentation for geqrf for further details.
Note
See also
torch.linalg.qr(), which computes Q and R matrices, andtorch.linalg.lstsq()with thedriver="gels"option for a function that can solve matrix equations using a QR decomposition.
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.geqrf.html