**
PyTorch的Permute、Transpose、view、unsqueeze和Numpy的resize,reshape
pytorch:https://pytorch.org/docs/stable/index.html
**
PyTorch的Permuted的使用:
PyTorch的Transpose的使用:transpose只能操作2D矩阵的转置。
>>> a = torch.randn(1, 2, 3, 4)
>>> a.size()
torch.Size([1, 2, 3, 4])
>>> b = a.transpose(1, 2) # Swaps 2nd and 3rd dimension
>>> b.size()
torch.Size([1, 3, 2, 4])
>>> c = a.view(1, 3, 2, 4) # Does not change tensor layout in memory
>>> c.size()
torch.Size([1, 3, 2, 4])