| 34 | }; |
| 35 | |
| 36 | TfLiteStatus CalculateOpData(const TfLiteContext* context, |
| 37 | const TfLitePoolParams* params, |
| 38 | const TfLiteTensor* input, |
| 39 | const TfLiteTensor* output, OpData* data) { |
| 40 | // input: batch, height, width, channel |
| 41 | int height = SizeOfDimension(input, 1); |
| 42 | int width = SizeOfDimension(input, 2); |
| 43 | |
| 44 | int out_height, out_width; |
| 45 | |
| 46 | data->padding = ComputePaddingHeightWidth( |
| 47 | params->stride_height, params->stride_width, /* dilation_rate= */ 1, |
| 48 | height, width, params->filter_height, params->filter_width, |
| 49 | params->padding, params->padding, &out_height, &out_width); |
| 50 | |
| 51 | return kTfLiteOk; |
| 52 | } |
| 53 | |
| 54 | void AverageEvalFloat(const TfLiteContext* context, const TfLiteNode* node, |
| 55 | const TfLitePoolParams* params, const OpData* data, |
no test coverage detected