| 15 | { |
| 16 | |
| 17 | void CastUint8ToFp32Test(std::vector<armnn::BackendId>& backends) |
| 18 | { |
| 19 | std::vector<int32_t> inputShape {1, 3, 2, 3}; |
| 20 | |
| 21 | std::vector<uint8_t> inputValues { 1, 3, 1, 3, 1, 3, 1, 3, 1, |
| 22 | 3, 1, 3, 1, 2, 1, 3, 1, 3 }; |
| 23 | |
| 24 | std::vector<float> expectedOutputValues { 1.0f, 3.0f, 1.0f, 3.0f, 1.0f, 3.0f, 1.0f, 3.0f, 1.0f, |
| 25 | 3.0f, 1.0f, 3.0f, 1.0f, 2.0f, 1.0f, 3.0f, 1.0f, 3.0f }; |
| 26 | |
| 27 | CastTest<uint8_t, float>(::tflite::TensorType_UINT8, |
| 28 | ::tflite::TensorType_FLOAT32, |
| 29 | inputShape, |
| 30 | inputValues, |
| 31 | expectedOutputValues, |
| 32 | 1.0f, |
| 33 | 0, |
| 34 | backends); |
| 35 | } |
| 36 | |
| 37 | void CastInt32ToFp32Test(std::vector<armnn::BackendId>& backends) |
| 38 | { |