From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- 21.02/_tf_lite_res_net_v2-_armnn_8cpp_source.xhtml | 122 +++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 21.02/_tf_lite_res_net_v2-_armnn_8cpp_source.xhtml (limited to '21.02/_tf_lite_res_net_v2-_armnn_8cpp_source.xhtml') diff --git a/21.02/_tf_lite_res_net_v2-_armnn_8cpp_source.xhtml b/21.02/_tf_lite_res_net_v2-_armnn_8cpp_source.xhtml new file mode 100644 index 0000000000..ab06d4aa60 --- /dev/null +++ b/21.02/_tf_lite_res_net_v2-_armnn_8cpp_source.xhtml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + +ArmNN: tests/TfLiteResNetV2-Armnn/TfLiteResNetV2-Armnn.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TfLiteResNetV2-Armnn.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #include "../InferenceTest.hpp"
6 #include "../ImagePreprocessor.hpp"
8 
9 using namespace armnnTfLiteParser;
10 
11 int main(int argc, char* argv[])
12 {
13  int retVal = EXIT_FAILURE;
14  try
15  {
16  // Coverity fix: The following code may throw an exception of type std::length_error.
17  std::vector<ImageSet> imageSet =
18  {
19  {"Dog.jpg", 209},
20  {"Cat.jpg", 283},
21  {"shark.jpg", 3},
22 
23  };
24 
25  armnn::TensorShape inputTensorShape({ 1, 299, 299, 3 });
26 
27  using DataType = float;
28  using DatabaseType = ImagePreprocessor<DataType>;
29  using ParserType = armnnTfLiteParser::ITfLiteParser;
30  using ModelType = InferenceModel<ParserType, DataType>;
31  // Coverity fix: ClassifierInferenceTestMain() may throw uncaught exceptions.
32  retVal = armnn::test::ClassifierInferenceTestMain<DatabaseType,
33  ParserType>(
34  argc, argv,
35  "resnet_v2_101_299.tflite", // model name
36  true, // model is binary
37  "input", // input tensor name
38  "output", // output tensor name
39  { 0, 1, 2 }, // test images to test with as above
40  [&imageSet](const char* dataDir, const ModelType &) {
41  return DatabaseType(
42  dataDir,
43  299,
44  299,
45  imageSet,
46  127.5f,
47  {0.5f,0.5f,0.5f});
48  },
49  &inputTensorShape);
50  }
51  catch (const std::exception& e)
52  {
53  // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
54  // exception of type std::length_error.
55  // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
56  std::cerr << "WARNING: " << *argv << ": An error has occurred when running "
57  "the classifier inference tests: " << e.what() << std::endl;
58  }
59  return retVal;
60 }
+ + + +
DataType
Definition: Types.hpp:32
+
int main(int argc, char *argv[])
+
int ClassifierInferenceTestMain(int argc, char *argv[], const char *modelFilename, bool isModelBinary, const char *inputBindingName, const char *outputBindingName, const std::vector< unsigned int > &defaultTestCaseIds, TConstructDatabaseCallable constructDatabase, const armnn::TensorShape *inputTensorShape=nullptr)
+ + +
+
+ + + + -- cgit v1.2.1