36 cmsis_nn_dims input_dims;
37 cmsis_nn_dims output_dims;
38 cmsis_nn_pool_params pool_params;
39 cmsis_nn_dims filter_dims;
42 const int depth = input_shape.
dims(3);
46 input_dims.h = input_shape.
dims(1);
47 input_dims.w = input_shape.
dims(2);
52 output_dims.w = output_width;
53 output_dims.c = depth;
55 pool_params.stride.h = params.
stride_h;
56 pool_params.stride.w = params.
stride_w;
57 pool_params.padding.h = params.
pad_h;
58 pool_params.padding.w = params.
pad_w;
67 auto res = arm_max_pool_s8(&ctx, &pool_params, &input_dims, input_data, &filter_dims,
68 &output_dims, output_data);
70 assert(res == ARM_CMSIS_NN_SUCCESS);
71 if (res != ARM_CMSIS_NN_SUCCESS)
OMStatus MaxPool(const core::Pool2DParams ¶ms, const core::OMRuntimeShape &input_shape, const int8_t *input_data, const core::OMRuntimeShape &output_shape, int8_t *output_data)