PyTorch torch.geqrf Function
PyTorch torch Reference Manual
torch.geqrfIt is a function in PyTorch used to compute the QR decomposition of a matrix, returning the Q and R matrices.
Function Definition
torch.geqrf(input)
Returns:
- a - Orthogonal matrix Q
- tau - Factor required to produce the orthogonal matrix
Usage Example
Example
import torch
# Create matrix
A = torch.randn(3, 3)
# QR decomposition
a, tau = torch.geqrf(A)
print("a (Q):", a)
print("tau:", tau)
# Create matrix
A = torch.randn(3, 3)
# QR decomposition
a, tau = torch.geqrf(A)
print("a (Q):", a)
print("tau:", tau)
Other Extensions