CMSIS-NN  
CMSIS NN Software Library
Pooling Functions

Content

 GetBufferSizePooling
 

Functions

arm_cmsis_nn_status arm_avgpool_s16 (const cmsis_nn_context *ctx, const cmsis_nn_pool_params *pool_params, const cmsis_nn_dims *input_dims, const int16_t *src, const cmsis_nn_dims *filter_dims, const cmsis_nn_dims *output_dims, int16_t *dst)
 s16 average pooling function. More...
 
arm_cmsis_nn_status arm_avgpool_s8 (const cmsis_nn_context *ctx, const cmsis_nn_pool_params *pool_params, const cmsis_nn_dims *input_dims, const int8_t *src, const cmsis_nn_dims *filter_dims, const cmsis_nn_dims *output_dims, int8_t *dst)
 s8 average pooling function. More...
 
arm_cmsis_nn_status arm_max_pool_s16 (const cmsis_nn_context *ctx, const cmsis_nn_pool_params *pool_params, const cmsis_nn_dims *input_dims, const int16_t *src, const cmsis_nn_dims *filter_dims, const cmsis_nn_dims *output_dims, int16_t *dst)
 s16 max pooling function. More...
 
arm_cmsis_nn_status arm_max_pool_s8 (const cmsis_nn_context *ctx, const cmsis_nn_pool_params *pool_params, const cmsis_nn_dims *input_dims, const int8_t *src, const cmsis_nn_dims *filter_dims, const cmsis_nn_dims *output_dims, int8_t *dst)
 s8 max pooling function. More...
 

Description

Perform max and average pooling operations

Function Documentation

◆ arm_avgpool_s16()

arm_cmsis_nn_status arm_avgpool_s16 ( const cmsis_nn_context ctx,
const cmsis_nn_pool_params pool_params,
const cmsis_nn_dims input_dims,
const int16_t *  input_data,
const cmsis_nn_dims filter_dims,
const cmsis_nn_dims output_dims,
int16_t *  output_data 
)
Parameters
[in,out]ctxFunction context (e.g. temporary buffer). Check the function definition file to see if an additional buffer is required. Optional function {API}_get_buffer_size() provides the buffer size if an additional buffer is required. The caller is expected to clear the buffer, if applicable, for security reasons.
[in]pool_paramsPooling parameters
[in]input_dimsInput (activation) tensor dimensions. Format: [H, W, C_IN] Argument 'N' is not used.
[in]input_dataInput (activation) data pointer. Data type: int16
[in]filter_dimsFilter tensor dimensions. Format: [H, W] Argument N and C are not used.
[in]output_dimsOutput tensor dimensions. Format: [H, W, C_OUT] Argument N is not used. C_OUT equals C_IN.
[in,out]output_dataOutput data pointer. Data type: int16
Returns
The function returns ARM_CMSIS_NN_SUCCESS - Successful operation ARM_CMSIS_NN_ARG_ERROR - In case of invalid arguments
  • Supported Framework: TensorFlow Lite

◆ arm_avgpool_s8()

arm_cmsis_nn_status arm_avgpool_s8 ( const cmsis_nn_context ctx,
const cmsis_nn_pool_params pool_params,
const cmsis_nn_dims input_dims,
const int8_t *  input_data,
const cmsis_nn_dims filter_dims,
const cmsis_nn_dims output_dims,
int8_t *  output_data 
)
Parameters
[in,out]ctxFunction context (e.g. temporary buffer). Check the function definition file to see if an additional buffer is required. Optional function {API}_get_buffer_size() provides the buffer size if an additional buffer is required. The caller is expected to clear the buffer, if applicable, for security reasons.
[in]pool_paramsPooling parameters
[in]input_dimsInput (activation) tensor dimensions. Format: [H, W, C_IN] Argument 'N' is not used.
[in]input_dataInput (activation) data pointer. Data type: int8
[in]filter_dimsFilter tensor dimensions. Format: [H, W] Argument N and C are not used.
[in]output_dimsOutput tensor dimensions. Format: [H, W, C_OUT] Argument N is not used. C_OUT equals C_IN.
[in,out]output_dataOutput data pointer. Data type: int8
Returns
The function returns ARM_CMSIS_NN_SUCCESS - Successful operation
  • Supported Framework: TensorFlow Lite

◆ arm_max_pool_s16()

arm_cmsis_nn_status arm_max_pool_s16 ( const cmsis_nn_context ctx,
const cmsis_nn_pool_params pool_params,
const cmsis_nn_dims input_dims,
const int16_t *  src,
const cmsis_nn_dims filter_dims,
const cmsis_nn_dims output_dims,
int16_t *  dst 
)
Parameters
[in,out]ctxFunction context (e.g. temporary buffer). Check the function definition file to see if an additional buffer is required. Optional function {API}_get_buffer_size() provides the buffer size if an additional buffer is required. The caller is expected to clear the buffer, if applicable, for security reasons.
[in]pool_paramsPooling parameters
[in]input_dimsInput (activation) tensor dimensions. Format: [H, W, C_IN] Argument 'N' is not used.
[in]srcInput (activation) data pointer. The input tensor must not overlap with the output tensor. Data type: int16
[in]filter_dimsFilter tensor dimensions. Format: [H, W] Argument N and C are not used.
[in]output_dimsOutput tensor dimensions. Format: [H, W, C_OUT] Argument N is not used. C_OUT equals C_IN.
[in,out]dstOutput data pointer. Data type: int16
Returns
The function returns ARM_CMSIS_NN_SUCCESS - Successful operation
  • Supported Framework: TensorFlow Lite

◆ arm_max_pool_s8()

arm_cmsis_nn_status arm_max_pool_s8 ( const cmsis_nn_context ctx,
const cmsis_nn_pool_params pool_params,
const cmsis_nn_dims input_dims,
const int8_t *  input_data,
const cmsis_nn_dims filter_dims,
const cmsis_nn_dims output_dims,
int8_t *  output_data 
)
Parameters
[in,out]ctxFunction context (e.g. temporary buffer). Check the function definition file to see if an additional buffer is required. Optional function {API}_get_buffer_size() provides the buffer size if an additional buffer is required. The caller is expected to clear the buffer, if applicable, for security reasons.
[in]pool_paramsPooling parameters
[in]input_dimsInput (activation) tensor dimensions. Format: [H, W, C_IN] Argument 'N' is not used.
[in]input_dataInput (activation) data pointer. The input tensor must not overlap with the output tensor. Data type: int8
[in]filter_dimsFilter tensor dimensions. Format: [H, W] Argument N and C are not used.
[in]output_dimsOutput tensor dimensions. Format: [H, W, C_OUT] Argument N is not used. C_OUT equals C_IN.
[in,out]output_dataOutput data pointer. Data type: int8
Returns
The function returns ARM_CMSIS_NN_SUCCESS - Successful operation
  • Supported Framework: TensorFlow Lite