im new to pytorch and i would like to check for each element in the tensor1 if it is part of the same row in the tensor2 for example if i have two tensor as follwoing:
a = torch.tensor([[0,5],[1,5], [4,5], [7,8]])
b = torch.tensor([[0,1],[2,3], [7,5], [-1,7]])
the output should be as following:
[ True, False]
[False, False]
[False, False]
[False, False]
[False, False]
[False, True]
[False, True]
[False, False]
i know that i can do it using a simple for loop but is there a way to do it faster in pytorch?