Premium problem33. Unique Rows

Medium Locked

Return the unique rows of the 2-D tensor Z, with duplicate rows removed.

Input

tensor([[0, 1, 0],
        [1, 1, 1],
        [0, 1, 0],
        [1, 0, 1]])

Output

tensor([[0, 1, 0],
        [1, 0, 1],
        [1, 1, 1]])

Premium problem

This one's part of Premium. Unlock the full PyTorch track plus every other premium problem on the site.

Implement solve(...)