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

Function SpaceToBatchNDFp32PaddingTest

delegate/test/BatchSpaceTest.cpp:103–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void SpaceToBatchNDFp32PaddingTest()
104{
105 std::vector<int32_t> inputShape { 2, 2, 4, 1 };
106 std::vector<int32_t> expectedOutputShape { 8, 1, 3, 1 };
107
108 std::vector<float> inputValues { 1.0f, 2.0f, 3.0f, 4.0f,
109 5.0f, 6.0f, 7.0f, 8.0f,
110 9.0f, 10.0f, 11.0f, 12.0f,
111 13.0f, 14.0f, 15.0f, 16.0f };
112
113 std::vector<float> expectedOutputValues { 0.0f, 1.0f, 3.0f, 0.0f, 9.0f, 11.0f,
114 0.0f, 2.0f, 4.0f, 0.0f, 10.0f, 12.0f,
115 0.0f, 5.0f, 7.0f, 0.0f, 13.0f, 15.0f,
116 0.0f, 6.0f, 8.0f, 0.0f, 14.0f, 16.0f };
117
118 std::vector<unsigned int> blockShape({2, 2});
119 std::vector<std::pair<unsigned int, unsigned int>> padding = {{0, 0}, {2, 0}};
120
121 BatchSpaceTest<float>(tflite::BuiltinOperator_SPACE_TO_BATCH_ND,
122 ::tflite::TensorType_FLOAT32,
123 inputShape,
124 expectedOutputShape,
125 inputValues,
126 blockShape,
127 padding,
128 expectedOutputValues);
129}
130
131void SpaceToBatchNDUint8Test()
132{

Callers 1

BatchSpaceTest.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected