Function float_grid_sample_2d_bilinear

pub fn float_grid_sample_2d_bilinear<B>(
    tensor: <B as Backend>::FloatTensorPrimitive,
    grid: <B as Backend>::FloatTensorPrimitive,
) -> <B as Backend>::FloatTensorPrimitive
where B: Backend,
Expand description

Default implementation of float_grid_sample_2d with bilinear interpolation and border padding

§Arguments

  • tensor - The tensor being sampled from, 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-right

§Returns

A tensor with shape (N, C, H_out, W_out)