| 11 | { |
| 12 | |
| 13 | void ResizeBiliniarFloat32Test(const std::vector<armnn::BackendId>& backends = {}) |
| 14 | { |
| 15 | // Set input data |
| 16 | std::vector<float> input1Values |
| 17 | { |
| 18 | 0.0f, 1.0f, 2.0f, |
| 19 | 3.0f, 4.0f, 5.0f, |
| 20 | 6.0f, 7.0f, 8.0f |
| 21 | }; |
| 22 | const std::vector<int32_t> input2NewShape { 5, 5 }; |
| 23 | |
| 24 | // Calculate output data |
| 25 | std::vector<float> expectedOutputValues |
| 26 | { |
| 27 | 0.0f, 0.6f, 1.2f, 1.8f, 2.0f, |
| 28 | 1.8f, 2.4f, 3.0f, 3.6f, 3.8f, |
| 29 | 3.6f, 4.2f, 4.8f, 5.4f, 5.6f, |
| 30 | 5.4f, 6.0f, 6.6f, 7.2f, 7.4f, |
| 31 | 6.0f, 6.6f, 7.2f, 7.8f, 8.0f |
| 32 | }; |
| 33 | |
| 34 | const std::vector<int32_t> input1Shape { 1, 3, 3, 1 }; |
| 35 | const std::vector<int32_t> input2Shape { 2 }; |
| 36 | const std::vector<int32_t> expectedOutputShape = { 1, 5, 5, 1 }; |
| 37 | |
| 38 | ResizeFP32TestImpl(tflite::BuiltinOperator_RESIZE_BILINEAR, |
| 39 | input1Values, |
| 40 | input1Shape, |
| 41 | input2NewShape, |
| 42 | input2Shape, |
| 43 | expectedOutputValues, |
| 44 | expectedOutputShape); |
| 45 | } |
| 46 | |
| 47 | void ResizeNearestNeighbourFloat32Test(const std::vector<armnn::BackendId>& backends = {}) |
| 48 | { |
no test coverage detected