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/_caffe_yolo-_armnn_8cpp_source.xhtml | 124 +++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 20.02/_caffe_yolo-_armnn_8cpp_source.xhtml (limited to '20.02/_caffe_yolo-_armnn_8cpp_source.xhtml') diff --git a/20.02/_caffe_yolo-_armnn_8cpp_source.xhtml b/20.02/_caffe_yolo-_armnn_8cpp_source.xhtml new file mode 100644 index 0000000000..307e8b18f3 --- /dev/null +++ b/20.02/_caffe_yolo-_armnn_8cpp_source.xhtml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + +ArmNN: tests/CaffeYolo-Armnn/CaffeYolo-Armnn.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
CaffeYolo-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 "../YoloInferenceTest.hpp"
7 #include "armnn/TypesUtils.hpp"
8 
9 int main(int argc, char* argv[])
10 {
11  armnn::TensorShape inputTensorShape{ { 1, 3, YoloImageHeight, YoloImageWidth } };
12 
13  using YoloInferenceModel = InferenceModel<armnnCaffeParser::ICaffeParser,
14  float>;
15 
16  int retVal = EXIT_FAILURE;
17  try
18  {
19  // Coverity fix: InferenceTestMain() may throw uncaught exceptions.
20  retVal = InferenceTestMain(argc, argv, { 0 },
21  [&inputTensorShape]()
22  {
23  return make_unique<YoloTestCaseProvider<YoloInferenceModel>>(
24  [&]
25  (const InferenceTestOptions &commonOptions,
26  typename YoloInferenceModel::CommandLineOptions modelOptions)
27  {
28  if (!ValidateDirectory(modelOptions.m_ModelDir))
29  {
30  return std::unique_ptr<YoloInferenceModel>();
31  }
32 
33  typename YoloInferenceModel::Params modelParams;
34  modelParams.m_ModelPath = modelOptions.m_ModelDir + "yolov1_tiny_voc2007_model.caffemodel";
35  modelParams.m_InputBindings = { "data" };
36  modelParams.m_OutputBindings = { "fc12" };
37  modelParams.m_InputShapes = { inputTensorShape };
38  modelParams.m_IsModelBinary = true;
39  modelParams.m_ComputeDevices = modelOptions.GetComputeDevicesAsBackendIds();
40  modelParams.m_VisualizePostOptimizationModel = modelOptions.m_VisualizePostOptimizationModel;
41  modelParams.m_EnableFp16TurboMode = modelOptions.m_EnableFp16TurboMode;
42 
43  return std::make_unique<YoloInferenceModel>(modelParams,
44  commonOptions.m_EnableProfiling,
45  commonOptions.m_DynamicBackendsPath);
46  });
47  });
48  }
49  catch (const std::exception& e)
50  {
51  // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an
52  // exception of type std::length_error.
53  // Using stderr instead in this context as there is no point in nesting try-catch blocks here.
54  std::cerr << "WARNING: CaffeYolo-Armnn: An error has occurred when running "
55  "the classifier inference tests: " << e.what() << std::endl;
56  }
57  return retVal;
58 }
constexpr unsigned int YoloImageHeight
+ + + + + +
constexpr unsigned int YoloImageWidth
+
bool ValidateDirectory(std::string &dir)
+
int main(int argc, char *argv[])
+ +
int InferenceTestMain(int argc, char *argv[], const std::vector< unsigned int > &defaultTestCaseIds, TConstructTestCaseProvider constructTestCaseProvider)
+
+
+ + + + -- cgit v1.2.1