I want to know is there any efficient way to get some rows from a given tensor, like lookup_embedding in tensorflow.
For a given tensor with
requires_grad = True, it will applied some functions/changes/masks, and then used as a look up table. Thus I am trying to find exactly the same way what
tensor[index] works, I wonder, is there more efficient way to do that.
Appreciate for any replies.