• 文档 >
  • torch >
  • torch.adjoint
快捷键

torch.adjoint

torch.adjoint(input: Tensor) Tensor

返回一个张量共轭且最后两个维度转置的视图。

对于复杂数张量, x.adjoint() 等同于 x.transpose(-2, -1).conj() ,对于实数张量,等同于 x.transpose(-2, -1)

参数:

{输入} –

示例::
>>> 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 贡献者。

使用 Sphinx 构建,主题由 Read the Docs 提供。

文档

查看 PyTorch 的全面开发者文档

查看文档

教程

深入了解初学者和高级开发者的教程

查看教程

资源

查找开发资源并获得您的疑问解答

查看资源