Let's say I have two PyTorch tensors:
t_1d = torch.Tensor([6, 5, 1, 7, 8, 4, 7, 1, 0, 4, 11, 7, 4, 7, 4, 1])
t = torch.Tensor([4, 7])
I want to get the indices of exact match intersection between the sets for the tensor t_1d with tensor t.
Desired output of t_1d and t: [5, 12] (first index of exact intersection)
Preferably on GPU for large Tensors, so no loops or Numpy casts.