Simd Library Documentation.

Home | Release Notes | Download | Documentation | Issues | GitHub
PoolingLayer functions

Functions to acceleratе PoolingLayer in Synet Framework. More...

Functions

SIMD_API void SimdSynetPoolingAverage (const float *src, size_t srcC, size_t srcH, size_t srcW, size_t kernelY, size_t kernelX, size_t strideY, size_t strideX, size_t padY, size_t padX, float *dst, size_t dstH, size_t dstW, SimdBool excludePad, SimdTensorFormatType format)
 This function is used for forward propagation of PoolingLayer (AveragePooling). More...
 
SIMD_API void SimdSynetPoolingMax32f (const float *src, size_t srcC, size_t srcH, size_t srcW, size_t kernelC, size_t kernelY, size_t kernelX, size_t strideC, size_t strideY, size_t strideX, size_t padC, size_t padY, size_t padX, float *dst, size_t dstC, size_t dstH, size_t dstW, SimdTensorFormatType format)
 This function is used for forward propagation of PoolingLayer (MaxPooling, 32-bit float). It supports 2D and 3D pooling. More...
 
SIMD_API void SimdSynetPoolingMax8u (const uint8_t *src, size_t srcC, size_t srcH, size_t srcW, size_t kernelY, size_t kernelX, size_t strideY, size_t strideX, size_t padY, size_t padX, uint8_t *dst, size_t dstH, size_t dstW, SimdTensorFormatType format)
 This function is used for forward propagation of PoolingLayer (MaxPooling, 8-bit unsigned integer). More...
 

Detailed Description

Functions to acceleratе PoolingLayer in Synet Framework.

Function Documentation

◆ SimdSynetPoolingAverage()

void SimdSynetPoolingAverage ( const float *  src,
size_t  srcC,
size_t  srcH,
size_t  srcW,
size_t  kernelY,
size_t  kernelX,
size_t  strideY,
size_t  strideX,
size_t  padY,
size_t  padX,
float *  dst,
size_t  dstH,
size_t  dstW,
SimdBool  excludePad,
SimdTensorFormatType  format 
)

This function is used for forward propagation of PoolingLayer (AveragePooling).

Note
This function is used in Synet Framework.
Parameters
[in]src- a pointer to the input 32-bit float array. The size of the array must be equal to srcC*srcH*srcW.
[in]srcC- a number of input and output channels.
[in]srcH- an input height.
[in]srcW- an input width.
[in]kernelY- a height of the pooling kernel.
[in]kernelX- a width of the pooling kernel.
[in]strideY- a y-stride of the pooling.
[in]strideX- a x-stride of the pooling.
[in]padY- a pad to the top of the input image.
[in]padX- a pad to the left of the input image.
[out]dst- a pointer to the output 32-bit float array. The size of the array must be equal to srcC*dstH*dstW.
[in]dstH- an output height.
[in]dstW- an output width.
[in]excludePad- a flag of exclude pad from average value calculation.
[in]format- a format of (input/output) image tensor.

◆ SimdSynetPoolingMax32f()

void SimdSynetPoolingMax32f ( const float *  src,
size_t  srcC,
size_t  srcH,
size_t  srcW,
size_t  kernelC,
size_t  kernelY,
size_t  kernelX,
size_t  strideC,
size_t  strideY,
size_t  strideX,
size_t  padC,
size_t  padY,
size_t  padX,
float *  dst,
size_t  dstC,
size_t  dstH,
size_t  dstW,
SimdTensorFormatType  format 
)

This function is used for forward propagation of PoolingLayer (MaxPooling, 32-bit float). It supports 2D and 3D pooling.

Note
This function is used in Synet Framework.
Parameters
[in]src- a pointer to the input 32-bit float array. The size of the array must be equal to srcC*srcH*srcW.
[in]srcC- a number of input channels.
[in]srcH- an input height.
[in]srcW- an input width.
[in]kernelC- a channel size of the pooling kernel in 3D case. In 2D case it must be equal to 1.
[in]kernelY- a height of the pooling kernel.
[in]kernelX- a width of the pooling kernel.
[in]strideC- a ñ-stride of the pooling in 3D case. In 2D case it must be equal to 1.
[in]strideY- a y-stride of the pooling.
[in]strideX- a x-stride of the pooling.
[in]padC- a channel pad to the begin of the input image.
[in]padY- a pad to the top of the input image.
[in]padX- a pad to the left of the input image.
[out]dst- a pointer to the output 32-bit float array. The size of the array must be equal to srcC*dstH*dstW.
[in]dstC- a number of output channels.
[in]dstH- an output height.
[in]dstW- an output width.
[in]format- a format of (input/output) image tensor.

◆ SimdSynetPoolingMax8u()

void SimdSynetPoolingMax8u ( const uint8_t *  src,
size_t  srcC,
size_t  srcH,
size_t  srcW,
size_t  kernelY,
size_t  kernelX,
size_t  strideY,
size_t  strideX,
size_t  padY,
size_t  padX,
uint8_t *  dst,
size_t  dstH,
size_t  dstW,
SimdTensorFormatType  format 
)

This function is used for forward propagation of PoolingLayer (MaxPooling, 8-bit unsigned integer).

Note
This function is used in Synet Framework.
Parameters
[in]src- a pointer to the input 8-bit unsigned integer array. The size of the array must be equal to srcC*srcH*srcW.
[in]srcC- a number of input and output channels.
[in]srcH- an input height.
[in]srcW- an input width.
[in]kernelY- a height of the pooling kernel.
[in]kernelX- a width of the pooling kernel.
[in]strideY- a y-stride of the pooling.
[in]strideX- a x-stride of the pooling.
[in]padY- a pad to the top of the input image.
[in]padX- a pad to the left of the input image.
[out]dst- a pointer to the output 8-bit unsigned integer array. The size of the array must be equal to srcC*dstH*dstW.
[in]dstH- an output height.
[in]dstW- an output width.
[in]format- a format of (input/output) image tensor.