View source: R/nnf-upsampling.R
nnf_interpolate | R Documentation |
Down/up samples the input to either the given size
or the given
scale_factor
nnf_interpolate(
input,
size = NULL,
scale_factor = NULL,
mode = "nearest",
align_corners = FALSE,
recompute_scale_factor = NULL
)
input |
(Tensor) the input tensor |
size |
(int or |
scale_factor |
(float or |
mode |
(str) algorithm used for upsampling: 'nearest' | 'linear' | 'bilinear' | 'bicubic' | 'trilinear' | 'area' Default: 'nearest' |
align_corners |
(bool, optional) Geometrically, we consider the pixels
of the input and output as squares rather than points. If set to TRUE,
the input and output tensors are aligned by the center points of their corner
pixels, preserving the values at the corner pixels. If set to False, the
input and output tensors are aligned by the corner points of their corner pixels,
and the interpolation uses edge value padding for out-of-boundary values,
making this operation independent of input size when |
recompute_scale_factor |
(bool, optional) recompute the scale_factor
for use in the interpolation calculation. When |
The algorithm used for interpolation is determined by mode
.
Currently temporal, spatial and volumetric sampling are supported, i.e. expected inputs are 3-D, 4-D or 5-D in shape.
The input dimensions are interpreted in the form:
mini-batch x channels x [optional depth] x [optional height] x width
.
The modes available for resizing are: nearest
, linear
(3D-only),
bilinear
, bicubic
(4D-only), trilinear
(5D-only), area
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.