fn
interpolate_nearest_2d_op
→TensorImplPtrint interpolate_nearest_2d_op(const int & input, int H_out, int W_out)Public 2-D nearest-neighbour resize with autograd.
Thin wrapper that delegates to InterpolateNearestBackward2D::forward.
Each output pixel receives the value of the nearest input pixel:
(clamped to valid index ranges). A backward node is attached.
Parameters
inputTensorImplPtr4-D input tensor
(N, C, H_in, W_in).H_outintDesired output height.
W_outintDesired output width.
Returns
TensorImplPtrResampled tensor of shape (N, C, H_out, W_out).