From d5d43d82c0137e08553e44345c609cdd1a7931c7 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Fri, 17 Jun 2022 13:24:58 +0100 Subject: Update Doxygen for 22.05 patch release * Pooling3D added to tfLite delegate * Available in tag 22.05.01 Signed-off-by: Nikhil Raj Change-Id: I8d605bba4e87d30baa2c6d7b338c78a4400dc021 --- 22.05.01/_onnx_mobile_net-_armnn_8cpp.xhtml | 162 ++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 22.05.01/_onnx_mobile_net-_armnn_8cpp.xhtml (limited to '22.05.01/_onnx_mobile_net-_armnn_8cpp.xhtml') diff --git a/22.05.01/_onnx_mobile_net-_armnn_8cpp.xhtml b/22.05.01/_onnx_mobile_net-_armnn_8cpp.xhtml new file mode 100644 index 0000000000..7ba9147332 --- /dev/null +++ b/22.05.01/_onnx_mobile_net-_armnn_8cpp.xhtml @@ -0,0 +1,162 @@ + + + + + + + + + + + + + +ArmNN: tests/OnnxMobileNet-Armnn/OnnxMobileNet-Armnn.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  22.05.01 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
OnnxMobileNet-Armnn.cpp File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Functions

int main (int argc, char *argv[])
 
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + + + + + + + + + + + + +
int main (int argc,
char * argv[] 
)
+
+ +

Definition at line 9 of file OnnxMobileNet-Armnn.cpp.

+
10 {
11  int retVal = EXIT_FAILURE;
12  try
13  {
14  // Coverity fix: The following code may throw an exception of type std::length_error.
15  std::vector<ImageSet> imageSet =
16  {
17  {"Dog.jpg", 208},
18  {"Cat.jpg", 281},
19  {"shark.jpg", 2},
20  };
21 
22  armnn::TensorShape inputTensorShape({ 1, 3, 224, 224 });
23 
24  using DataType = float;
25  using DatabaseType = ImagePreprocessor<float>;
26  using ParserType = armnnOnnxParser::IOnnxParser;
27  using ModelType = InferenceModel<ParserType, DataType>;
28 
29  // Coverity fix: ClassifierInferenceTestMain() may throw uncaught exceptions.
30  retVal = armnn::test::ClassifierInferenceTestMain<DatabaseType, ParserType>(
31  argc, argv,
32  "mobilenetv2-1.0.onnx", // model name
33  true, // model is binary
34  "data", "mobilenetv20_output_flatten0_reshape0", // input and output tensor names
35  { 0, 1, 2 }, // test images to test with as above
36  [&imageSet](const char* dataDir, const ModelType&) {
37  // This creates create a 1, 3, 224, 224 normalized input with mean and stddev to pass to Armnn
38  return DatabaseType(
39  dataDir,
40  224,
41  224,
42  imageSet,
43  255.0, // scale
44  {{0.485f, 0.456f, 0.406f}}, // mean
45  {{0.229f, 0.224f, 0.225f}}, // stddev
46  DatabaseType::DataFormat::NCHW); // format
47  },
48  &inputTensorShape);
49  }
50  catch (const std::exception& e)
51  {
52  // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
53  // exception of type std::length_error.
54  // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
55  std::cerr << "WARNING: OnnxMobileNet-Armnn: An error has occurred when running "
56  "the classifier inference tests: " << e.what() << std::endl;
57  }
58  return retVal;
59 }
+ +
DataType
Definition: Types.hpp:48
+ + +
+
+
+
+
+ + + + -- cgit v1.2.1