MCPcopy Create free account
hub / github.com/ARM-software/armnn / SplitUint8Test

Function SplitUint8Test

delegate/test/SplitTest.cpp:14–41  ·  view source on GitHub ↗

SPLIT Operator

Source from the content-addressed store, hash-verified

12
13// SPLIT Operator
14void SplitUint8Test()
15{
16 std::vector<int32_t> axisShape { 1 };
17 std::vector<int32_t> inputShape { 2, 2, 2, 2} ;
18 std::vector<int32_t> outputShape0 { 2, 2, 2, 1 };
19 std::vector<int32_t> outputShape1 { 2, 2, 2, 1 };
20 std::vector<std::vector<int32_t>> outputShapes{ outputShape0, outputShape1 };
21
22 std::vector<int32_t> axisData { 3 }; // Axis
23 std::vector<uint8_t> inputValues { 1, 2, 3, 4, 5, 6, 7, 8,
24 9, 10, 11, 12, 13, 14, 15, 16 }; // Input
25
26
27 std::vector<uint8_t> expectedOutputValues0 { 1, 3, 5, 7, 9, 11, 13, 15 };
28 std::vector<uint8_t> expectedOutputValues1 { 2, 4, 6, 8, 10, 12, 14, 16 };
29 std::vector<std::vector<uint8_t>> expectedOutputValues{ expectedOutputValues0, expectedOutputValues1 };
30
31 int32_t numSplits = 2;
32
33 SplitTest<uint8_t>(::tflite::TensorType_UINT8,
34 axisShape,
35 inputShape,
36 outputShapes,
37 axisData,
38 inputValues,
39 expectedOutputValues,
40 numSplits);
41}
42
43void SplitFp32Test()
44{

Callers 1

SplitTest.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected