How to get unique sequences

Hi, I want to get unique rows from a matrix, which means from

torch.LongTensor([[2,2,3],[1,2,3],[1,2,3]])
I want to get [[2,2,3],[1,2,3]] and their position [0,1]. and remove all redundancy rows

1 Like

we dont have any in-built function to do this.

1 Like

You can use torch.unique