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

Function ConvolutionTest

delegate/test/ConvolutionTestHelper.hpp:190–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188
189template <typename T, typename B = float>
190void ConvolutionTest(tflite::BuiltinOperator convolutionOperatorCode,
191 tflite::TensorType tensorType,
192 uint32_t strideX,
193 uint32_t strideY,
194 uint32_t dilationX,
195 uint32_t dilationY,
196 tflite::Padding padding,
197 tflite::ActivationFunctionType fused_activation_function,
198 std::vector<int32_t>& inputShape,
199 std::vector<int32_t>& filterShape,
200 std::vector<int32_t>& outputShape,
201 std::vector<T>& inputValues,
202 std::vector<T>& filterValues,
203 std::vector<T>& expectedOutputValues,
204 const std::vector<int32_t>& biasShape = {},
205 const std::vector<B>& biasValues = {},
206 const std::vector<float> biasScales = {1.0f},
207 const std::vector<int64_t> biasOffsets = {0},
208 const std::vector<float> filterScales = {1.0f},
209 const std::vector<int64_t> filterOffsets = {0},
210 float outputQuantScale = 2.0f,
211 int outputQuantOffset = 0,
212 float quantScale = 1.0f,
213 int quantOffset = 0,
214 int32_t depth_multiplier = 1,
215 int32_t filterQuantizationDim = 3,
216 const std::vector<armnn::BackendId>& backends = {})
217{
218 using namespace delegateTestInterpreter;
219
220 std::vector<char> modelBuffer;
221 modelBuffer = CreateConv2dTfLiteModel(convolutionOperatorCode,
222 tensorType,
223 strideX,
224 strideY,
225 dilationX,
226 dilationY,
227 padding,
228 fused_activation_function,
229 inputShape,
230 filterShape,
231 biasShape,
232 outputShape,
233 filterValues,
234 biasValues,
235 biasScales,
236 biasOffsets,
237 filterScales,
238 filterOffsets,
239 outputQuantScale,
240 outputQuantOffset,
241 quantScale,
242 quantOffset,
243 depth_multiplier,
244 filterQuantizationDim);
245
246 // Setup interpreter with just TFLite Runtime.
247 auto tfLiteInterpreter = DelegateTestInterpreter(modelBuffer);

Callers

nothing calls this directly

Calls 8

CreateConv2dTfLiteModelFunction · 0.85
CaptureAvailableBackendsFunction · 0.85
CompareOutputShapeFunction · 0.85
AllocateTensorsMethod · 0.80
InvokeMethod · 0.45
GetOutputShapeMethod · 0.45
CleanupMethod · 0.45

Tested by

no test coverage detected