Hello,
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.
As an example
2d_index = [[0,3] ] [2,1]]
num_vector = [0, 5, 10, 20]
final_number should be [[0,20][10,5]]
Thanks for the help!