resize2dLayer
Description
A 2-D resize layer resizes 2-D input by a scale factor, to a specified height and width, or to the size of a reference input feature map. Use of this layer requires Deep Learning Toolbox™.
Creation
Syntax
Description
layer = resize2dLayer('Scale',
creates
a 2-D resize layer and sets the Scale property as the
scale factor specified by scale
)scale
.
layer = resize2dLayer('OutputSize',
creates a 2-D resize layer and sets the OutputSize property
with the height and width specified by outputSize
)outputSize
.
layer = resize2dLayer('EnableReferenceInput',tf)
creates a 2-D
resize layer and sets the EnableReferenceInput
property with the boolean specified by tf
. When you specify the value
as true
, the layer adds an additional input that accepts a reference
feature map and resizes the input to the size of the reference feature map.
layer = resize2dLayer(___,
sets the optional Method, GeometricTransformMode,
NearestRoundingMode,
and Name properties using name-value pair
arguments. You can specify multiple name-value pair arguments. Enclose each property name
in single quotes.Name,Value
)
Example: layer = resize2dLayer('OutputSize',[128
128],'Method','bilinear')
creates a 2-D resize layer that resizes input to
128-by-128 pixels using bilinear interpolation
Properties
Examples
Extended Capabilities
Version History
Introduced in R2020bSee Also
resize3dLayer
| dlresize
| averagePooling2dLayer
(Deep Learning Toolbox) | transposedConv2dLayer
(Deep Learning Toolbox) | importONNXLayers
(Deep Learning Toolbox)
Topics
- Deep Learning in MATLAB (Deep Learning Toolbox)
- Specify Layers of Convolutional Neural Network (Deep Learning Toolbox)
- List of Deep Learning Layers (Deep Learning Toolbox)