| 515 | } |
| 516 | |
| 517 | void AveragePool2dFP32Relu6Test(const std::vector<armnn::BackendId>& backends = {}) |
| 518 | { |
| 519 | // Set input data |
| 520 | std::vector<int32_t> inputShape { 1, 3, 4, 1 }; |
| 521 | std::vector<int32_t> outputShape { 1, 2, 2, 1 }; |
| 522 | |
| 523 | std::vector<float> inputValues = { -5.0f, 8.0f, -10.0f, 7.0f, |
| 524 | -8.0f, 12.0f, -15.0f, 2.0f, |
| 525 | 3.0f, -4.0f, -1.0f, 11.0f }; |
| 526 | |
| 527 | std::vector<float> expectedOutputValues = { 0.0f, 0.0f, 3.0f, 0.0f }; |
| 528 | |
| 529 | Pooling2dTest<float>(tflite::BuiltinOperator_AVERAGE_POOL_2D, |
| 530 | ::tflite::TensorType_FLOAT32, |
| 531 | inputShape, |
| 532 | outputShape, |
| 533 | inputValues, |
| 534 | expectedOutputValues, |
| 535 | backends, |
| 536 | ::tflite::Padding_SAME, |
| 537 | 2, |
| 538 | 2, |
| 539 | 1, |
| 540 | 1, |
| 541 | ::tflite::ActivationFunctionType_RELU6); |
| 542 | } |
| 543 | |
| 544 | void AveragePool2dInt8Relu6Test(const std::vector<armnn::BackendId>& backends = {}) |
| 545 | { |