pytorch中tensor的基本维度变换:transpose/permute/t/cat/chunk/split/stack/squeeze/unsqueeze/expand/repeat
直接从代码中学习tensor的一些维度变换操作:importtorchtorch.manual_seed(2020)x=torch.rand(1,2,3)print(x)#tensor([[[0.4869,0.1052,0.5883],[0.1161,0.4949,0.2824]]])print('\nview:')print(x.view(-1,3).size())#torch.Size([2,