I am wondering what will be the most efficient way to do the following task in Pytorch?
I have a 2-d matrix consists of the index location, I want to use this matrix to do an element-wise indexing of a vector to get a new 2-d matrix that now contains the actual value.