torch.stack() & torch.repeat() & torch.repeat_interleave() & torch转置 详解
torch.stack((a,b),dim=n)把tensor按垂直方向堆起来h1=torch.tensor([1,1,1,1])h2=torch.tensor([2,2,2,2])result=torch.stack((h1,h2),dim=0)result,result.shape(tensor([[1,1,1,1],[2,2,2,2]]),torch.Size([2,4]))把tesnsor