theta: (Tensor) input batch of affine matrices with shape (N×2×3) for 2D or (N×3×4) for 3D
size: (torch.Size) the target output image size. (N×C×H×W
for 2D or N×C×D×H×W for 3D) Example: torch.Size((32, 3, 24, 24))
align_corners: (bool, optional) if True, consider -1 and 1
to refer to the centers of the corner pixels rather than the image corners. Refer to nnf_grid_sample() for a more complete description. A grid generated by nnf_affine_grid() should be passed to nnf_grid_sample() with the same setting for this option. Default: False
Note
This function is often used in conjunction with nnf_grid_sample()