Skip to content
fn

affine_grid_op

→TensorImplPtr
int affine_grid_op(const int & theta, int N, int H, int W, bool align_corners)

Python wrappers

Public Python APIs implemented by this engine symbol.

Public affine-grid entry point.

Thin wrapper that delegates to AffineGridBackward::forward.

Parameters

thetaTensorImplPtr
Affine matrices of shape (N, 2, 3).
Nint
Batch size (must equal theta.shape()[0]).
Hint
Output grid height.
Wint
Output grid width.
align_cornersbool
Lattice placement mode.

Returns

TensorImplPtr

Sampling grid of shape (N, H, W, 2).