From the docs:
Tensor.T:
Returns a view of this tensor with its dimensions reversed.
Ifn
is the number of dimensions inx
,x.T
is equivalent tox.permute(n-1, n-2, ..., 0)
.
Returns a view of a matrix (2-D tensor) conjugated and transposed.
x.H
is equivalent tox.transpose(0, 1).conj()
for complex matrices andx.transpose(0, 1)
for real matrices.