If input is:
x=torch.tensor([[1,2],[3,4],[3,4],[1,2]])
how can I get the unqiue of x as:
tensor([[1,2],[3,4]])
If input is:
x=torch.tensor([[1,2],[3,4],[3,4],[1,2]])
how can I get the unqiue of x as:
tensor([[1,2],[3,4]])
You can specify the dimension using the dim
argument:
x.unique(dim=0)