pub fn float_grid_sample_2d_ref<B>(
tensor: <B as Backend>::FloatTensorPrimitive,
grid: <B as Backend>::FloatTensorPrimitive,
options: GridSampleOptions,
) -> <B as Backend>::FloatTensorPrimitivewhere
B: Backend,Expand description
Reference implementation of grid_sample_2d that supports all options.
§Arguments
tensor- The tensor being sampled from, must be contiguous with shape (N, C, H_in, W_in)grid- A tensor of locations, with shape (N, H_out, W_out, 2). Values are [-1, 1]. A [x = -1, y = -1] means top-left, and [x = 1, y = 1] means bottom-rightoptions- Grid sampling options
§Returns
A tensor with shape (N, C, H_out, W_out)