fn
grid_sample_op
→TensorImplPtrint grid_sample_op(const int & input, const int & grid, int mode, int padding_mode, bool align_corners)Python wrappers
Public Python APIs implemented by this engine symbol.Public grid-sample entry point.
Thin wrapper that delegates to GridSampleBackward::forward.
Parameters
inputTensorImplPtr4-D input image
(N, C, H_in, W_in).gridTensorImplPtrSampling grid
(N, H_out, W_out, 2) with coordinates in .modeintInterpolation kernel code (
0/1/2 for bilinear/nearest/bicubic).padding_modeintOut-of-bounds policy code (
0/1/2 for zeros/border/reflection).align_cornersboolCoordinate mapping mode.
Returns
TensorImplPtrResampled tensor of shape (N, C, H_out, W_out).