Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

nnf_affine_grid

Affine_grid


Description

Generates a 2D or 3D flow field (sampling grid), given a batch of affine matrices theta.

Usage

nnf_affine_grid(theta, size, align_corners = FALSE)

Arguments

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 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() to build Spatial Transformer Networks_ .


torch

Tensors and Neural Networks with 'GPU' Acceleration

v0.3.0
MIT + file LICENSE
Authors
Daniel Falbel [aut, cre, cph], Javier Luraschi [aut], Dmitriy Selivanov [ctb], Athos Damiani [ctb], Christophe Regouby [ctb], Krzysztof Joachimiak [ctb], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.