PyTorch:tensor常用操作
tensor常用操作一、维度重新排列二、Tensor.expand()三、torch.cat()四、torch.split()五、torch.chunk()一、维度重新排列permuate二、Tensor.expand()Tensor.expand(sizes)将tensor进行扩展,size为扩展后的维度,-1表示对这一维度不进行拓展Returns a new view of the self tensor with singleton dimensions expanded to a la