I am using torch.mm but for some reason I am getting this error: RuntimeError: matrices expected, got 1D, 2D tensors at /pytorch/aten/src/TH/generic/THTensorMath.cpp:131
here is a small portion of what I am doing using the torch.mm function :
h = self.Layer(x)
x = torch.mm(h,Permutation_tensor.float().transpose(0,1))


Actually, I am doing this in order to permute the elements at the position 5 to the position 2 and 3 to 4 etc. You got the idea, I think so any help would be very good