ClikaRT::ops::grid_sample
function
grid_sample()
Tensor grid_sample(
Tensor x,
Tensor grid,
GridSampleMode mode = GridSampleMode::Bilinear,
GridSamplePaddingMode padding_mode = GridSamplePaddingMode::Zeros,
bool align_corners = false
)
Samples a channels-last input at arbitrary grid coordinates.
x [N, spatial_in.., C]; grid [N, spatial_out.., S] with S the spatial rank, coordinates normalized to [-1, 1]. mode picks the interpolation (Bilinear / Nearest / …), padding_mode the out-of-range policy (Zeros / Border / Reflection), align_corners the corner convention.
Parameters
x: channels-last input.grid: normalized sample coordinates.mode: interpolation. DefaultGridSampleMode::Bilinear.padding_mode: out-of-range policy. DefaultGridSamplePaddingMode::Zeros.align_corners: corner convention. Defaultfalse.
Throws
ClikaRT::Error: when the input's dtype/shape is not served for this operation (the machine-readable reason ridescode_name()).
Returns: [N, spatial_out.., C], dtype of x.
Declared in ClikaRT/compute/ops.h, line 4489