| 11 | { |
| 12 | |
| 13 | void ReduceUint8KeepDimsTest(tflite::BuiltinOperator reduceOperatorCode, |
| 14 | std::vector<uint8_t>& expectedOutputValues, |
| 15 | const std::vector<armnn::BackendId>& backends = {}) |
| 16 | { |
| 17 | std::vector<int32_t> input0Shape { 1, 1, 2, 3 }; |
| 18 | std::vector<int32_t> input1Shape { 1 }; |
| 19 | std::vector<int32_t> expectedOutputShape { 1, 1, 1, 3 }; |
| 20 | |
| 21 | std::vector<uint8_t> input0Values { 1, 2, 3, |
| 22 | 4, 3, 1 }; // Inputs |
| 23 | std::vector<int32_t> input1Values { 2 }; // Axis |
| 24 | |
| 25 | ReduceTest<uint8_t>(reduceOperatorCode, |
| 26 | ::tflite::TensorType_UINT8, |
| 27 | input0Shape, |
| 28 | input1Shape, |
| 29 | expectedOutputShape, |
| 30 | input0Values, |
| 31 | input1Values, |
| 32 | expectedOutputValues, |
| 33 | true, |
| 34 | backends); |
| 35 | } |
| 36 | |
| 37 | void ReduceUint8Test(tflite::BuiltinOperator reduceOperatorCode, |
| 38 | std::vector<uint8_t>& expectedOutputValues, |