create_dl_layer_pooling T_create_dl_layer_pooling CreateDlLayerPooling CreateDlLayerPooling create_dl_layer_pooling (Operator)
Name
create_dl_layer_pooling T_create_dl_layer_pooling CreateDlLayerPooling CreateDlLayerPooling create_dl_layer_pooling — Create a pooling layer.
Signatur
void CreateDlLayerPooling (const HTuple& DLLayerInput , const HTuple& LayerName , const HTuple& KernelSize , const HTuple& Stride , const HTuple& Padding , const HTuple& Mode , const HTuple& GenParamName , const HTuple& GenParamValue , HTuple* DLLayerPooling )
HDlLayer HDlLayer ::CreateDlLayerPooling (const HString& LayerName , const HTuple& KernelSize , const HTuple& Stride , const HTuple& Padding , const HString& Mode , const HTuple& GenParamName , const HTuple& GenParamValue ) const
HDlLayer HDlLayer ::CreateDlLayerPooling (const HString& LayerName , const HTuple& KernelSize , const HTuple& Stride , const HString& Padding , const HString& Mode , const HString& GenParamName , const HString& GenParamValue ) const
HDlLayer HDlLayer ::CreateDlLayerPooling (const char* LayerName , const HTuple& KernelSize , const HTuple& Stride , const char* Padding , const char* Mode , const char* GenParamName , const char* GenParamValue ) const
HDlLayer HDlLayer ::CreateDlLayerPooling (const wchar_t* LayerName , const HTuple& KernelSize , const HTuple& Stride , const wchar_t* Padding , const wchar_t* Mode , const wchar_t* GenParamName , const wchar_t* GenParamValue ) const
(Nur Windows)
static void HOperatorSet .CreateDlLayerPooling (HTuple DLLayerInput , HTuple layerName , HTuple kernelSize , HTuple stride , HTuple padding , HTuple mode , HTuple genParamName , HTuple genParamValue , out HTuple DLLayerPooling )
HDlLayer HDlLayer .CreateDlLayerPooling (string layerName , HTuple kernelSize , HTuple stride , HTuple padding , string mode , HTuple genParamName , HTuple genParamValue )
HDlLayer HDlLayer .CreateDlLayerPooling (string layerName , HTuple kernelSize , HTuple stride , string padding , string mode , string genParamName , string genParamValue )
def create_dl_layer_pooling (dllayer_input : HHandle, layer_name : str, kernel_size : Sequence[int], stride : Sequence[int], padding : MaybeSequence[Union[str, int]], mode : str, gen_param_name : MaybeSequence[str], gen_param_value : MaybeSequence[Union[int, float, str]]) -> HHandle
Beschreibung
The operator create_dl_layer_pooling create_dl_layer_pooling CreateDlLayerPooling CreateDlLayerPooling CreateDlLayerPooling create_dl_layer_pooling creates a pooling layer whose
handle is returned in DLLayerPooling DLLayerPooling DLLayerPooling DLLayerPooling DLLayerPooling dllayer_pooling .
The parameter DLLayerInput DLLayerInput DLLayerInput DLLayerInput DLLayerInput dllayer_input determines the feeding input layer and
expects the layer handle as value.
The parameter LayerName LayerName LayerName LayerName layerName layer_name sets an individual layer name.
Note that if creating a model using create_dl_model create_dl_model CreateDlModel CreateDlModel CreateDlModel create_dl_model each layer of
the created network must have an unique name.
The parameter KernelSize KernelSize KernelSize KernelSize kernelSize kernel_size specifies the filter kernel in the
dimensions width and height.
The parameter Stride Stride Stride Stride stride stride specifies how the filter is shifted.
The values for KernelSize KernelSize KernelSize KernelSize kernelSize kernel_size and Stride Stride Stride Stride stride stride
can be set as
a single value which is used for both dimensions
a tuple [width, height] and [column, row],
respectively.
The parameter Padding Padding Padding Padding padding padding determines the padding, thus
how many pixels with value 0 are appended on the boarder of the
processed input image. Supported values are:
'half_kernel_size' "half_kernel_size" "half_kernel_size" "half_kernel_size" "half_kernel_size" "half_kernel_size" : The number of appended pixels
depends on the specifies KernelSize KernelSize KernelSize KernelSize kernelSize kernel_size .
More precisely they are calculated as
,
where for the padding on the left / right bound the value of
KernelSize KernelSize KernelSize KernelSize kernelSize kernel_size in dimension width is regarded
and for the padding on the upper / lower bound the value of
KernelSize KernelSize KernelSize KernelSize kernelSize kernel_size in height.
'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 bound of the input image is zero if the kernel size
is a divisor of the input dimension or
else. The values
,
,
and
stand for the input width or height and the
according entries in KernelSize KernelSize KernelSize KernelSize kernelSize kernel_size and Stride Stride Stride Stride stride stride ,
respectively.
'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.
Restriction: The integer padding values must be smaller
than the value set for KernelSize KernelSize KernelSize KernelSize kernelSize kernel_size in the corresponding dimension.
The output dimensions of the pooling layer are given by
Thereby we use the following values:
: output width,
: input width,
: corresponding entry in KernelSize KernelSize KernelSize KernelSize kernelSize kernel_size ,
: corresponding entry in Stride Stride Stride Stride stride stride ,
: 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 Mode Mode Mode Mode mode mode specifies the mode of the pooling operation.
Supported modes are:
'average' "average" "average" "average" "average" "average" :
The resulting pixel value is the average of
all pixel values in the filter.
'maximum' "maximum" "maximum" "maximum" "maximum" "maximum" :
The resulting pixel value is the maximum of
all pixel values in the filter.
'global_average' "global_average" "global_average" "global_average" "global_average" "global_average" :
Same as mode 'average' "average" "average" "average" "average" "average" , but
the internally used kernel size is changed to
and the
internally used stride is set to the new kernel size. Following the
above formula, this can be used to control the desired output dimensions
without the knowledge of the dimensions of the input dimensions. E.g.,
if the average over all pixel values of the input shall be returned, set
the kernel_size to 1 and the output width and height
is equal to 1 . As a consequence, the output dimension equals the
kernel size if the kernel size is a divisor of the input dimension.
'global_maximum' "global_maximum" "global_maximum" "global_maximum" "global_maximum" "global_maximum" :
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“.
The following generic parameters GenParamName GenParamName GenParamName GenParamName genParamName gen_param_name and the corresponding
values GenParamValue GenParamValue GenParamValue GenParamValue genParamValue gen_param_value are supported:
'is_inference_output' "is_inference_output" "is_inference_output" "is_inference_output" "is_inference_output" "is_inference_output" :
Determines whether apply_dl_model apply_dl_model ApplyDlModel ApplyDlModel ApplyDlModel apply_dl_model will include the output of this
layer in the dictionary DLResultBatch DLResultBatch DLResultBatch DLResultBatch DLResultBatch dlresult_batch even without specifying this
layer in Outputs Outputs Outputs Outputs outputs outputs ('true' "true" "true" "true" "true" "true" ) or not ('false' "false" "false" "false" "false" "false" ).
Default: 'false' "false" "false" "false" "false" "false"
'num_trainable_params' "num_trainable_params" "num_trainable_params" "num_trainable_params" "num_trainable_params" "num_trainable_params" :
Number of trainable parameters (weights and biases) of the layer.
Certain parameters of layers created using this operator
create_dl_layer_pooling create_dl_layer_pooling CreateDlLayerPooling CreateDlLayerPooling CreateDlLayerPooling create_dl_layer_pooling can be set and retrieved using
further operators.
The following tables give an overview, which parameters can be set
using set_dl_model_layer_param set_dl_model_layer_param SetDlModelLayerParam SetDlModelLayerParam SetDlModelLayerParam set_dl_model_layer_param and which ones can be retrieved
using get_dl_model_layer_param get_dl_model_layer_param GetDlModelLayerParam GetDlModelLayerParam GetDlModelLayerParam get_dl_model_layer_param or get_dl_layer_param get_dl_layer_param GetDlLayerParam GetDlLayerParam GetDlLayerParam get_dl_layer_param . Note, the
operators set_dl_model_layer_param set_dl_model_layer_param SetDlModelLayerParam SetDlModelLayerParam SetDlModelLayerParam set_dl_model_layer_param and get_dl_model_layer_param get_dl_model_layer_param GetDlModelLayerParam GetDlModelLayerParam GetDlModelLayerParam get_dl_model_layer_param
require a model created by create_dl_model create_dl_model CreateDlModel CreateDlModel CreateDlModel create_dl_model .
Generic Layer Parameters
set
get
'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"
Ausführungsinformationen
Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
Wird ohne Parallelisierung verarbeitet.
Parameter
DLLayerInput DLLayerInput DLLayerInput DLLayerInput DLLayerInput dllayer_input (input_control) dl_layer → HDlLayer , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Feeding layer.
LayerName LayerName LayerName LayerName layerName layer_name (input_control) string → HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Name of the layer.
KernelSize KernelSize KernelSize KernelSize kernelSize kernel_size (input_control) number-array → HTuple Sequence[int] HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Width and height of the filter kernels.
Defaultwert: [2,2]
Stride Stride Stride Stride stride stride (input_control) number-array → HTuple Sequence[int] HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Bi-dimensional amount of filter shift.
Defaultwert: [2,2]
Padding Padding Padding Padding padding padding (input_control) number(-array) → HTuple MaybeSequence[Union[str, int]] HTuple Htuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)
Type of padding.
Defaultwert:
'none'
"none"
"none"
"none"
"none"
"none"
Wertevorschläge: 'none' "none" "none" "none" "none" "none" , 'half_kernel_size' "half_kernel_size" "half_kernel_size" "half_kernel_size" "half_kernel_size" "half_kernel_size" , 'implicit' "implicit" "implicit" "implicit" "implicit" "implicit"
Mode Mode Mode Mode mode mode (input_control) number → HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Mode of pooling operation.
Defaultwert:
'maximum'
"maximum"
"maximum"
"maximum"
"maximum"
"maximum"
Werteliste: '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"
GenParamName GenParamName GenParamName GenParamName genParamName gen_param_name (input_control) attribute.name(-array) → HTuple MaybeSequence[str] HTuple Htuple (string) (string ) (HString ) (char* )
Generic input parameter names.
Defaultwert: []
Werteliste: 'is_inference_output' "is_inference_output" "is_inference_output" "is_inference_output" "is_inference_output" "is_inference_output"
GenParamValue GenParamValue GenParamValue GenParamValue genParamValue gen_param_value (input_control) attribute.value(-array) → HTuple MaybeSequence[Union[int, float, str]] HTuple Htuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)
Generic input parameter values.
Defaultwert: []
Wertevorschläge: 'true' "true" "true" "true" "true" "true" , 'false' "false" "false" "false" "false" "false" , 1.0, 0.9, 0.0
DLLayerPooling DLLayerPooling DLLayerPooling DLLayerPooling DLLayerPooling dllayer_pooling (output_control) dl_layer → HDlLayer , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Pooling layer.
Modul
Deep Learning Training