a tuple [width, height] and [column, row],
respectively.
The parameter PaddingPaddingPaddingPaddingpaddingpadding determines the padding, thus
how many pixels with value 0 are appended on the border of the
processed input image. Supported values are:
'implicit'"implicit""implicit""implicit""implicit""implicit": No pixels are appended on the left
or on the top of the input image. The number of pixels appended on the
right or lower border of the input image is
,
or zero if the kernel size is a divisor of the input dimension.
stands for the input width or height.
'none'"none""none""none""none""none": No pixels are appended.
Number of pixels: Specify the number of pixels
appended on each border. To do so, the following tuple lengths are
supported:
Single number: Padding in all four directions
left/right/top/bottom.
Two numbers: Padding in left/right and top/bottom:
[l/r, t/b].
Four numbers: Padding on left, right, top, bottom side:
[l,r,t,b].
Restriction:'runtime'"runtime""runtime""runtime""runtime""runtime"'gpu'"gpu""gpu""gpu""gpu""gpu" does
not support asymmetric padding, i.e., the padding values for the
left and right side must be equal, as well as the padding values for
the top and bottom side.
The output dimensions of the pooling layer are given by
Thereby we use the following values:
: output width,
: input width,
: number of pixels added to the left/top of
the input image, and
: number of pixels added to the right/bottom of
the input image.
The parameter ModeModeModeModemodemode specifies the mode of the pooling operation.
Supported modes are:
Same as mode 'average'"average""average""average""average""average", but
without the knowledge of the spatial dimensions of the input, it is
possible to define the desired output dimensions via the parameter
KernelSizeKernelSizeKernelSizeKernelSizekernelSizekernel_size. E.g., if the average over all pixel values of the
input shall be returned, set the KernelSizeKernelSizeKernelSizeKernelSizekernelSizekernel_size to 1 and the
output width and height is equal to 1.
The internally used kernel size and stride are calculated as follows:
If KernelSizeKernelSizeKernelSizeKernelSizekernelSizekernel_size is not a divisor of the input dimension:
The calculation of the internally used kernel size and stride depend on
the generic parameter 'global_pooling_mode'"global_pooling_mode""global_pooling_mode""global_pooling_mode""global_pooling_mode""global_pooling_mode":
The internally used
is set to
.
The internally used kernel size is then computed as
. This leads
to overlapping kernels but the whole input image is taken into account
for the computation of the output.
The internally used kernel size and
stride are set to the same value . This leads to
non-overlapping pooling kernels, but parts of the input image at the
right or bottom border might not be considered when computing the
output. In this mode, due to rounding the output size is not always
equal to the size given by KernelSizeKernelSizeKernelSizeKernelSizekernelSizekernel_size.
In this mode, for each pixel
of the output, the size of the corresponding pooling
area within the input is computed adaptively, where are the
row and are the column indices of the output. The row
indices of the pooling area for pixels of the -th output row
are given by
, where
in this case the height of the KernelSizeKernelSizeKernelSizeKernelSizekernelSizekernel_size is used. The
computation of the column coordinates is done analogously. This means
that neighboring pooling areas can have a different size which can lead
to a less efficient implementation. However, the pooling areas are only
overlapping by one pixel which is generally less overlap than for
'global_pooling_mode'"global_pooling_mode""global_pooling_mode""global_pooling_mode""global_pooling_mode""global_pooling_mode"'overlapping'"overlapping""overlapping""overlapping""overlapping""overlapping". The whole input
image is taken into account for the computation of the output. For this
mode, the parameter PaddingPaddingPaddingPaddingpaddingpadding must be set to 'none'"none""none""none""none""none".
Same as mode 'global_average'"global_average""global_average""global_average""global_average""global_average",
but the maximum is calculated instead of the average.
For more information about the pooling layer see the
“Solution Guide on Classification”.
Mode for calculation of the internally
used kernel size and stride in case of global pooling (ModeModeModeModemodemode'global_average'"global_average""global_average""global_average""global_average""global_average" or 'global_maximum'"global_maximum""global_maximum""global_maximum""global_maximum""global_maximum"). See description
above. In case of a non-global pooling the parameter is set to the value
'undefined'"undefined""undefined""undefined""undefined""undefined".
Determines whether apply_dl_modelapply_dl_modelApplyDlModelApplyDlModelApplyDlModelapply_dl_model will include the output of this
layer in the dictionary DLResultBatchDLResultBatchDLResultBatchDLResultBatchDLResultBatchdlresult_batch even without specifying
this layer in OutputsOutputsOutputsOutputsoutputsoutputs ('true'"true""true""true""true""true") or not
('false'"false""false""false""false""false").
List of values: 'average'"average""average""average""average""average", 'global_average'"global_average""global_average""global_average""global_average""global_average", 'global_maximum'"global_maximum""global_maximum""global_maximum""global_maximum""global_maximum", 'maximum'"maximum""maximum""maximum""maximum""maximum"
List of values: 'global_pooling_mode'"global_pooling_mode""global_pooling_mode""global_pooling_mode""global_pooling_mode""global_pooling_mode", 'is_inference_output'"is_inference_output""is_inference_output""is_inference_output""is_inference_output""is_inference_output", 'num_trainable_params'"num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params""num_trainable_params"