拼接张量
1、torch.cat()
2、torch.stack()
扩大张量
1、torch.Tensor.expand()
2、torch.unsqueeze()
压缩张量
1、torch.squeeze()
重复张量
1、torch.Tensor.repeat()
2、torch.Tensor.unfold()
缩小张量
1、torch.Tensor.narrow()
张量变形
1、torch.Tensor.view()
重设张量尺寸
1、torch.Tensor.resize_()
2、torch.reshape()
置换张量维度
1、torch.Tensor.permute()
https://www.codenong.com/cs106989249/