From the docs:
tensor.t:
Expects
inputto be <= 2-D tensor and transposes dimensions 0 and 1.
0-D and 1-D tensors are returned as is. When input is a 2-D tensor this is equivalent totranspose(input, 0, 1).
Returns a view of this tensor with its dimensions reversed.
Ifnis the number of dimensions inx,x.Tis equivalent tox.permute(n-1, n-2, ..., 0).
In your use case both will yield the same result.