Is there anything similar to grid_sample for 1D input?

/is there any way I can make index selection diff wrt indices?

1 Like

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~

1 Like