CMSIS-NN  Version 1.1.0
CMSIS NN Software Library
 All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Macros Groups Pages
Neural Network Pooling Functions

Functions

void arm_maxpool_q7_HWC (q7_t *Im_in, const uint16_t dim_im_in, const uint16_t ch_im_in, const uint16_t dim_kernel, const uint16_t padding, const uint16_t stride, const uint16_t dim_im_out, q7_t *bufferA, q7_t *Im_out)
 Q7 max pooling function. More...
 
void arm_avepool_q7_HWC (q7_t *Im_in, const uint16_t dim_im_in, const uint16_t ch_im_in, const uint16_t dim_kernel, const uint16_t padding, const uint16_t stride, const uint16_t dim_im_out, q7_t *bufferA, q7_t *Im_out)
 Q7 average pooling function. More...
 

Description

Perform pooling functions, including max pooling and average pooling

Function Documentation

void arm_avepool_q7_HWC ( q7_t *  Im_in,
const uint16_t  dim_im_in,
const uint16_t  ch_im_in,
const uint16_t  dim_kernel,
const uint16_t  padding,
const uint16_t  stride,
const uint16_t  dim_im_out,
q7_t *  bufferA,
q7_t *  Im_out 
)
Parameters
[in,out]Im_inpointer to input tensor
[in]dim_im_ininput tensor dimention
[in]ch_im_innumber of input tensor channels
[in]dim_kernelfilter kernel size
[in]paddingpadding sizes
[in]strideconvolution stride
[in]dim_im_outoutput tensor dimension
[in,out]bufferApointer to buffer space for input
[in,out]Im_outpointer to output tensor
Returns
none.

Buffer size:

bufferA size: 2*dim_im_out*ch_im_in

The pooling function is implemented as split x-pooling then y-pooling.

This pooling function is input-destructive. Input data is undefined after calling this function.

References arm_q7_to_q15_no_shift().

void arm_maxpool_q7_HWC ( q7_t *  Im_in,
const uint16_t  dim_im_in,
const uint16_t  ch_im_in,
const uint16_t  dim_kernel,
const uint16_t  padding,
const uint16_t  stride,
const uint16_t  dim_im_out,
q7_t *  bufferA,
q7_t *  Im_out 
)
Parameters
[in,out]Im_inpointer to input tensor
[in]dim_im_ininput tensor dimention
[in]ch_im_innumber of input tensor channels
[in]dim_kernelfilter kernel size
[in]paddingpadding sizes
[in]strideconvolution stride
[in]dim_im_outoutput tensor dimension
[in,out]bufferApointer to buffer space for input
[in,out]Im_outpointer to output tensor
Returns
none.

Buffer size:

bufferA size: 0

The pooling function is implemented as split x-pooling then y-pooling.

This pooling function is input-destructive. Input data is undefined after calling this function.

Referenced by main().