Affine_grid
Generates a 2D or 3D flow field (sampling grid), given a batch of
affine matrices theta
.
nnf_affine_grid(theta, size, align_corners = FALSE)
theta |
(Tensor) input batch of affine matrices with shape (N \times 2 \times 3) for 2D or (N \times 3 \times 4) for 3D |
size |
(torch.Size) the target output image size. (N \times C \times H \times W for 2D or N \times C \times D \times H \times W for 3D) Example: torch.Size((32, 3, 24, 24)) |
align_corners |
(bool, optional) if |
This function is often used in conjunction with nnf_grid_sample()
to build Spatial Transformer Networks
_ .
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.