Intel® Math Kernel Library 2019 Developer Reference - C
Creates propagation operations for pooling layers. Note: The Deep Neural Network (DNN) component in Intel MKL is deprecated and will be removed in a future release. You can continue to use optimized functions for deep neural networks through Intel Math Kernel Library for Deep Neural Networks.
dnnError_t dnnPoolingCreateForward_F32 (dnnPrimitive_t *pPooling, dnnPrimitiveAttributes_t attributes, dnnAlgorithm_t op, const dnnLayout_t srcLayout, const size_t kernelSize[], const size_t kernelStride[], const int inputOffset[], const dnnBorder_t borderType);
dnnError_t dnnPoolingCreateBackward_F32 (dnnPrimitive_t *pPooling, dnnPrimitiveAttributes_t attributes, dnnAlgorithm_t op, const dnnLayout_t srcLayout, const size_t kernelSize[], const size_t kernelStride[], const int inputOffset[], const dnnBorder_t borderType);
dnnError_t dnnPoolingCreateForward_F64 (dnnPrimitive_t *pPooling, dnnPrimitiveAttributes_t attributes, dnnAlgorithm_t op, const dnnLayout_t srcLayout, const size_t kernelSize[], const size_t kernelStride[], const int inputOffset[], const dnnBorder_t borderType);
dnnError_t dnnPoolingCreateBackward_F64 (dnnPrimitive_t *pPooling, dnnPrimitiveAttributes_t attributes, dnnAlgorithm_t op, const dnnLayout_t srcLayout, const size_t kernelSize[], const size_t kernelStride[], const int inputOffset[], const dnnBorder_t borderType);
op |
The operation used by pooling: min, max, or average with padded elements taken into account or not. |
attributes |
The set of attributes for the primitive. |
srcLayout |
The layout of the input. |
kernelSize |
kernelSize[i] is the size of the filter along the dimension i. |
kernelStride |
Spatial intervals by which to shift the pooling region. |
inputOffset |
An array of size:
Describes the offset for the spatial domain. Values of inputOffset must be non-positive and specify the spatial offset to add to the indices when applying the filter to the input:
|
borderType |
The method to pad the input when pooling runs out of the input array. |
pPooling |
Pointer to the primitive to create:
|
Each dnnPoolingCreate function creates a forward or backward propagation operation for pooling layers. A pooling operation is defined as:
Formulas to calculate the sizes of the output spatial domain depend on the value of borderType as illustrated for the width:
If borderType equals dnnBorderZeros,
If borderType equals dnnBorderZerosAsymm,
In these formulas:
OW is the output width
IW is the input width
KW is the kernel width (kernelSize[0])
S is the kernel stride for width (kernelStride[0])