SPLIT_V Operator
| 88 | |
| 89 | // SPLIT_V Operator |
| 90 | void SplitVUint8Test() |
| 91 | { |
| 92 | std::vector<int32_t> axisShape { 1 }; |
| 93 | std::vector<int32_t> inputShape { 2, 4, 2, 2 }; |
| 94 | std::vector<int32_t> splitsShape { 2 }; |
| 95 | std::vector<int32_t> outputShape0 { 2, 3, 2, 2 }; |
| 96 | std::vector<int32_t> outputShape1 { 2, 1, 2, 2 }; |
| 97 | std::vector<std::vector<int32_t>> outputShapes{ outputShape0, outputShape1 }; |
| 98 | |
| 99 | std::vector<int32_t> axisData { 1 }; // Axis |
| 100 | std::vector<int32_t> splitsData { 3, 1 }; // Splits |
| 101 | std::vector<uint8_t> inputValues { 1, 2, 3, 4, 5, 6, 7, 8, |
| 102 | 9, 10, 11, 12, 13, 14, 15, 16, |
| 103 | 17, 18, 19, 20, 21, 22, 23, 24, |
| 104 | 25, 26, 27, 28, 29, 30, 31, 32 }; // Input |
| 105 | |
| 106 | |
| 107 | std::vector<uint8_t> expectedOutputValues0 { 1, 2, 3, 4, 5, 6, 7, 8, |
| 108 | 9, 10, 11, 12, 17, 18, 19, 20, |
| 109 | 21, 22, 23, 24, 25, 26, 27, 28 }; |
| 110 | std::vector<uint8_t> expectedOutputValues1 { 13, 14, 15, 16, 29, 30, 31, 32 }; |
| 111 | std::vector<std::vector<uint8_t>> expectedOutputValues{ expectedOutputValues0, expectedOutputValues1 }; |
| 112 | |
| 113 | int32_t numSplits = 2; |
| 114 | |
| 115 | SplitVTest<uint8_t>(::tflite::TensorType_UINT8, |
| 116 | inputShape, |
| 117 | splitsShape, |
| 118 | axisShape, |
| 119 | outputShapes, |
| 120 | inputValues, |
| 121 | splitsData, |
| 122 | axisData, |
| 123 | expectedOutputValues, |
| 124 | numSplits); |
| 125 | } |
| 126 | |
| 127 | void SplitVFp32Test() |
| 128 | { |