cat
a = torch.rand(4,32,8)
b = torch.rand(5,32,8)
print(torch.cat([a, b], dim=0).shape)
stack: create new dim
a = torch.rand(32,8)
b = torch.rand(32,8)
print(torch.stack([a, b], dim=0).shape)
split: by len
a = torch.rand(32,8)
b = torch.rand(32,8)
c = torch.stack([a, b], dim=0)
print(c.shape)
aa, bb = c.split([1, 1], dim=0)
print(aa.shape)
print(bb.shape)
aa_1, bb_1 = c.split([10, 22], dim=1)
print(aa_1.shape)
print(bb_1.shape)
chunk: by num
a = torch.rand(32,8)
b = torch.rand(32,8)
c = torch.stack([a,b], dim=0)
print(c.shape)
aa, bb = c.chunk(2, dim=0)
print(aa.shape)
print(bb.shape)
aa_1, bb_1 = c.chunk(2, dim=2)
print(aa_1.shape)
print(bb_1.shape)