From f4019872c1134c6fcc1d6993e5746f55c1e79208 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Tue, 8 Mar 2022 20:01:38 +0000 Subject: IVGCVSW-6819 Fix the directory structure and broken link to latest docu Signed-off-by: Nikhil Raj Change-Id: I05b559d15faf92c76ff536719693b361316be4f3 --- ...s_net_v2-50-_quantized-_armnn_8cpp_source.xhtml | 122 +++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 22.02/_tf_lite_res_net_v2-50-_quantized-_armnn_8cpp_source.xhtml (limited to '22.02/_tf_lite_res_net_v2-50-_quantized-_armnn_8cpp_source.xhtml') diff --git a/22.02/_tf_lite_res_net_v2-50-_quantized-_armnn_8cpp_source.xhtml b/22.02/_tf_lite_res_net_v2-50-_quantized-_armnn_8cpp_source.xhtml new file mode 100644 index 0000000000..5446a5dd5b --- /dev/null +++ b/22.02/_tf_lite_res_net_v2-50-_quantized-_armnn_8cpp_source.xhtml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + +ArmNN: tests/TfLiteResNetV2-50-Quantized-Armnn/TfLiteResNetV2-50-Quantized-Armnn.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  22.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TfLiteResNetV2-50-Quantized-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  std::vector<ImageSet> imageSet =
17  {
18  {"Dog.jpg", 209},
19  {"Cat.jpg", 283},
20  {"shark.jpg", 3},
21 
22  };
23 
24  armnn::TensorShape inputTensorShape({ 1, 224, 224, 3 });
25 
26  using DataType = uint8_t;
27  using DatabaseType = ImagePreprocessor<DataType>;
28  using ParserType = armnnTfLiteParser::ITfLiteParser;
29  using ModelType = InferenceModel<ParserType, DataType>;
30 
31  // Coverity fix: ClassifierInferenceTestMain() may throw uncaught exceptions.
32  retVal = armnn::test::ClassifierInferenceTestMain<DatabaseType,
33  ParserType>(
34  argc, argv,
35  "resnet_v2_50_default_minmax.tflite", // model name
36  true, // model is binary
37  "input", // input tensor name
38  "resnet_v2_50/predictions/Reshape_1", // output tensor name
39  { 0, 1, 2 }, // test images to test with as above
40  [&imageSet](const char* dataDir, const ModelType &) {
41  // we need to get the input quantization parameters from
42  // the parsed model
43  return DatabaseType(
44  dataDir,
45  224,
46  224,
47  imageSet,
48  1);
49  },
50  &inputTensorShape);
51  }
52  catch (const std::exception& e)
53  {
54  // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
55  // exception of type std::length_error.
56  // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
57  std::cerr << "WARNING: " << *argv << ": An error has occurred when running "
58  "the classifier inference tests: " << e.what() << std::endl;
59  }
60  return retVal;
61 }
int main(int argc, char *argv[])
+ + + + +
DataType
Definition: Types.hpp:35
+
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