From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/_tf_lite_res_net_v2-_armnn_8cpp.xhtml | 165 ++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 20.02/_tf_lite_res_net_v2-_armnn_8cpp.xhtml (limited to '20.02/_tf_lite_res_net_v2-_armnn_8cpp.xhtml') diff --git a/20.02/_tf_lite_res_net_v2-_armnn_8cpp.xhtml b/20.02/_tf_lite_res_net_v2-_armnn_8cpp.xhtml new file mode 100644 index 0000000000..44731c5e8b --- /dev/null +++ b/20.02/_tf_lite_res_net_v2-_armnn_8cpp.xhtml @@ -0,0 +1,165 @@ + + + + + + + + + + + + + +ArmNN: tests/TfLiteResNetV2-Armnn/TfLiteResNetV2-Armnn.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TfLiteResNetV2-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 11 of file TfLiteResNetV2-Armnn.cpp.

+ +

References armnn::test::ClassifierInferenceTestMain().

+
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 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