/is there any way I can make index selection diff wrt indices?
I have the same question. I think it’s important for tasks like stereo matching.
Here is my implementation of grid sample 1d. And I also implement grid sample 1d with grid_sample in Pytorch by regarding 1d as a special case of 2d. Overall, my implementation is 2~3x faster in forward pass. Hope it helps~