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

Function SplitFp32Test

delegate/test/SplitTest.cpp:43–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43void SplitFp32Test()
44{
45 std::vector<int32_t> axisShape { 1 };
46 std::vector<int32_t> inputShape { 2, 2, 2, 2 };
47 std::vector<int32_t> outputShape0 { 2, 1, 2, 2 };
48 std::vector<int32_t> outputShape1 { 2, 1, 2, 2 };
49 std::vector<std::vector<int32_t>> outputShapes{ outputShape0, outputShape1 };
50
51 std::vector<int32_t> axisData { 1 }; // Axis
52 std::vector<float> inputValues { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f,
53 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f }; // Input
54
55
56 std::vector<float> expectedOutputValues0 { 1.0f, 2.0f, 3.0f, 4.0f, 9.0f, 10.0f, 11.0f, 12.0f };
57 std::vector<float> expectedOutputValues1 { 5.0f, 6.0f, 7.0f, 8.0f, 13.0f, 14.0f, 15.0f, 16.0f };
58 std::vector<std::vector<float>> expectedOutputValues{ expectedOutputValues0, expectedOutputValues1 };
59
60 int32_t numSplits = 2;
61
62 SplitTest<float>(::tflite::TensorType_FLOAT32,
63 axisShape,
64 inputShape,
65 outputShapes,
66 axisData,
67 inputValues,
68 expectedOutputValues,
69 numSplits);
70}
71
72// SPLIT Test Suite
73TEST_SUITE("SPLITTests")

Callers 1

SplitTest.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected