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.

Syntax

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);

Include Files

  • mkl.h

Input Parameters

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:

  • dimension - 2 if borderType equals dnnBorderZeros

  • 2*(dimension-2) if borderType equals dnnBorderZerosAsymm

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:

  • If borderType equals dnnBorderZeros, inputOffset[i] specifies equal left and right offsets.

  • If borderType equals dnnBorderZerosAsymm, inputOffset[i] specifies the left (top) offset, while inputOffset[dimension - 2 + i] specifies the right (bottom) offset.

borderType

The method to pad the input when pooling runs out of the input array.

Output Parameters

pPooling

Pointer to the primitive to create:

dnnPoolingCreateForward

Forward

dnnPoolingCreateBackward

Backward

Description

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])

Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.
Seleccione el color del botón adhesivo: 
Orange (only for download buttons)