Solved by ptrblck in post #2 
              
              
                If you want to compare each row of ten_A to ten_B and get the row index for a match, this code should work: 
a = torch.randint(0, 4, (10, 2))
b = torch.tensor([0, 1])
b = b.unsqueeze(0)

print((a == b).all(dim=1).nonzero())