Example codes as followed:
import torch
T = torch.rand(3,3)
print(T.H)
print(T.T)
And the corresponding output:
tensor([[0.9100, 0.4052, 0.8227],
[0.9101, 0.5563, 0.8068],
[0.5961, 0.8708, 0.0686]])
tensor([[0.9100, 0.4052, 0.8227],
[0.9101, 0.5563, 0.8068],
[0.5961, 0.8708, 0.0686]])
tensor([[0.9100, 0.9101, 0.5961],
[0.4052, 0.5563, 0.8708],
[0.8227, 0.8068, 0.0686]])