fn
rotate_op
→TensorImplPtrint rotate_op(const int & input, double angle_deg, double cy, double cx)Rotate a 4-D image batch around an arbitrary centre.
Applies the standard 2-D rotation matrix
with to each channel of the input independently. Sampling uses bilinear interpolation with zero padding for out-of-bounds destinations. No autograd node is attached — the operation is inference-only.
Parameters
inputTensorImplPtr4-D image batch of shape
(N, C, H, W).angle_degdoubleRotation angle in degrees (counter-clockwise).
cydoubleRotation centre row coordinate (typically
(H - 1) / 2).cxdoubleRotation centre column coordinate (typically
(W - 1) / 2).Returns
TensorImplPtrRotated image batch of shape (N, C, H, W).