import torch
sele_nei = []
a = torch.tensor([2, 3, 6, 0, 1])[np.newaxis]
b = torch.tensor([4, 3, 6, 0, 1])[np.newaxis]
c = torch.tensor([2, 3, 4, 0, 1])[np.newaxis]
print("a: ", a)
sele_nei.append(a)
sele_nei.append(b)
sele_nei.append(c)
print("sele_nei: ", sele_nei)
sele_nei = torch.cat(sele_nei, dim=0)
print("sele_nei: ", sele_nei)
如果dim=1就输出这个