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

Function AddConstInputTest

delegate/test/ElementwiseBinaryTest.cpp:130–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void AddConstInputTest()
131{
132 std::vector<int32_t> input0Shape { 1, 3, 2, 1 };
133 std::vector<int32_t> input1Shape { 1 };
134 std::vector<int32_t> expectedOutputShape { 1, 3, 2, 1 };
135
136 std::vector<float> input0Values
137 {
138 0.0f,
139 1.0f,
140
141 2.0f,
142 3.0f,
143
144 4.0f,
145 5.0f,
146 };
147 std::vector<float> input1Values
148 {
149 0.5f
150 };
151 // Set output data
152 std::vector<float> expectedOutputValues
153 {
154 0.5f,
155 1.5f,
156
157 2.5f,
158 3.5f,
159
160 4.5f,
161 5.5f,
162 };
163
164 ElementwiseBinaryTest<float>(tflite::BuiltinOperator_ADD,
165 tflite::ActivationFunctionType_NONE,
166 ::tflite::TensorType_FLOAT32,
167 input0Shape,
168 input1Shape,
169 expectedOutputShape,
170 input0Values,
171 input1Values,
172 expectedOutputValues,
173 1.0f,
174 0,
175 true);
176}
177
178void AddActivationTest()
179{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected