| 375 | } |
| 376 | |
| 377 | void AveragePool2dInt8PaddingValidTest(const std::vector<armnn::BackendId>& backends = {}) |
| 378 | { |
| 379 | // Set input data |
| 380 | std::vector<int32_t> inputShape { 1, 3, 4, 1 }; |
| 381 | std::vector<int32_t> outputShape { 1, 1, 2, 1 }; |
| 382 | |
| 383 | std::vector<int8_t > inputValues = { -5, 8, -10, 7, |
| 384 | 8, 12, -15, 2, |
| 385 | 3, -4, -1, -11 }; |
| 386 | |
| 387 | std::vector<int8_t> expectedOutputValues = { 6, -4 }; |
| 388 | |
| 389 | Pooling2dTest<int8_t>(tflite::BuiltinOperator_AVERAGE_POOL_2D, |
| 390 | ::tflite::TensorType_INT8, |
| 391 | inputShape, |
| 392 | outputShape, |
| 393 | inputValues, |
| 394 | expectedOutputValues, |
| 395 | backends, |
| 396 | ::tflite::Padding_VALID, |
| 397 | 2, |
| 398 | 2, |
| 399 | 2, |
| 400 | 2, |
| 401 | tflite::ActivationFunctionType_NONE, |
| 402 | 2.5f, |
| 403 | 1); |
| 404 | } |
| 405 | |
| 406 | void AveragePool2dFP32PaddingSameTest(const std::vector<armnn::BackendId>& backends = {}) |
| 407 | { |