torch.adjoint
-
torch.adjoint(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)
© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.adjoint.html