| 95 | } |
| 96 | |
| 97 | void ReshapeFlattenTest(bool useOption = true, const std::vector<armnn::BackendId>& backends = {}) |
| 98 | { |
| 99 | // Set input data |
| 100 | std::vector<int32_t> inputShape { 1, 3, 4, 1 }; |
| 101 | std::vector<int32_t> outputShape { 6, 2 }; |
| 102 | std::vector<int32_t> targetShape { -1, 2 }; |
| 103 | |
| 104 | std::vector<float> inputValues = { -5.0f, 8.0f, -10.0f, 7.0f, |
| 105 | 8.0f, 12.0f, -15.0f, 2.0f, |
| 106 | 3.0f, -4.0f, -1.0f, -11.0f }; |
| 107 | |
| 108 | std::vector<float> expectedOutputValues = { -5.0f, 8.0f, -10.0f, 7.0f, |
| 109 | 8.0f, 12.0f, -15.0f, 2.0f, |
| 110 | 3.0f, -4.0f, -1.0f, -11.0f }; |
| 111 | |
| 112 | RedefineTest<float>(tflite::BuiltinOperator_RESHAPE, |
| 113 | ::tflite::TensorType_FLOAT32, |
| 114 | inputShape, |
| 115 | outputShape, |
| 116 | inputValues, |
| 117 | expectedOutputValues, |
| 118 | targetShape, |
| 119 | useOption, |
| 120 | backends); |
| 121 | } |
| 122 | |
| 123 | void ReshapeFlattenAllTest(bool useOption = true, const std::vector<armnn::BackendId>& backends = {}) |
| 124 | { |