Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PyTorch torch.geqrf function

PyTorch torch.geqrf function


PyTorch torch reference manual PyTorch torch reference manual

torch.geqrf A function in PyTorch for computing the QR decomposition of a matrix, returning the Q and R matrices.

Function definition

torch.geqrf(input)


Returns:


Usage examples

Example

import

torch

Create a matrix

A

=

torch.

randn

(

3

,

3

)

QR decomposition

a

,

tau

=

torch.

geqrf

(

A

)

print

(

"a (Q):"

,

a

)

print

(

"tau:"

,

tau

)


PyTorch torch reference manual PyTorch torch reference manual