function: 调换tensor的维度次序。
parameters: *dims (int...) – 所需要维度的次序(The desired ordering of dimensions)。
return: 已改变维度的张量的视图(Returns a view of the original tensor with its dimensions permuted.)。
examples:
>>>import torch
>>>x = torch.randn(2, 3, 5)
>>> x.size()
torch.Size([2, 3, 5])
>>> x.permute(2, 0, 1).size()
torch.Size([5, 2, 3])