快捷方式

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 的全面開發者文件

檢視文件

教程

獲取面向初學者和高階開發者的深度教程

檢視教程

資源

查詢開發資源並獲得問題解答

檢視資源