快捷鍵

torch.adjoint

torch.adjoint(input: Tensor) Tensor

傳回張量的共軛視圖,並將最後兩個維度轉置。

x.adjoint() 等同於複數張量的 x.transpose(-2, -1).conj(),以及實數張量的 x.transpose(-2, -1)

參數

{input}

範例:
>>> x = torch.arange(4, dtype=torch.float)
>>> A = torch.complex(x, x).reshape(2, 2)
>>> A
tensor([[0.+0.j, 1.+1.j],
        [2.+2.j, 3.+3.j]])
>>> A.adjoint()
tensor([[0.-0.j, 2.-2.j],
        [1.-1.j, 3.-3.j]])
>>> (A.adjoint() == A.mH).all()
tensor(True)

文件

存取 PyTorch 的完整開發者文件

檢視文件

教學

取得針對初學者和進階開發者的深入教學

檢視教學

資源

尋找開發資源並獲得問題解答

檢視資源