Solved by Xiaoyu_Song in post #7 
              
              
                Thank you for your reply, your solution give my a hint, I find another solution: 
a = torch.Tensor([[1,2,3],[4,5,6],[7,8,9]])
b = torch.Tensor([[1,3,7],[2,4,8],[3,7,9],[4,5,6]])
c = torch.Tensor([[1,2,3],[2,4,8],[3,7,9],[3,5,6],[7,8,9]])
d = torch.cat((a,b,c))
print(d.shape)
d_unique = torch.unique(…