PyTorch torch.geqrf 関数


Pytorch torch リファレンスマニュアル

torch.geqrfは、PyTorch で行列の QR 分解を計算するための関数であり、Q 行列と R 行列を返します。

関数定義

torch.geqrf(input)

戻り値:

  • a - 直交行列 Q
  • tau - 直交行列を生成するために必要な因子

使用例

実例

import torch

# 行列を作成
A = torch.randn(3, 3)

# QR分解
a, tau = torch.geqrf(A)
print("a (Q):", a)
print("tau:", tau)

Pytorch torch リファレンスマニュアル

その他の拡張