Give a 2D matrix of integers, I would like to get the index of the row that has the corresponding value. For example, if I have a matrix A = [[1,2], [2,3], [3,4]] and if I have the value for column 1 =3, column 2=4, which leads to [3,4]. Then this function should return index number 2 from matrix A given that the third row corresponds to [3,4]. How can I do this in PyTorch?