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_preprocessor_8hpp_source.xhtml | 120 ++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 20.02/_caffe_preprocessor_8hpp_source.xhtml (limited to '20.02/_caffe_preprocessor_8hpp_source.xhtml') diff --git a/20.02/_caffe_preprocessor_8hpp_source.xhtml b/20.02/_caffe_preprocessor_8hpp_source.xhtml new file mode 100644 index 0000000000..bc5f7322aa --- /dev/null +++ b/20.02/_caffe_preprocessor_8hpp_source.xhtml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + +ArmNN: tests/CaffePreprocessor.hpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
CaffePreprocessor.hpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 
9 #include <array>
10 #include <string>
11 #include <vector>
12 #include <memory>
13 
14 /// Caffe requires BGR images, not normalized, mean adjusted and resized using smooth resize of STB library
15 
16 using ImageSet = std::pair<const std::string, unsigned int>;
17 
19 {
20 public:
21  using DataType = float;
23 
24  explicit CaffePreprocessor(const std::string& binaryFileDirectory,
25  unsigned int width = 227,
26  unsigned int height = 227,
27  const std::vector<ImageSet>& imageSet = std::vector<ImageSet>());
28  std::unique_ptr<TTestCaseData> GetTestCaseData(unsigned int testCaseId);
29 
30 private:
31  unsigned int GetNumImageElements() const { return 3 * m_Width * m_Height; }
32  unsigned int GetNumImageBytes() const { return 4 * GetNumImageElements(); }
33 
34  std::string m_BinaryDirectory;
35  unsigned int m_Height;
36  unsigned int m_Width;
37  // Mean value of the database [B, G, R].
38  const std::array<float, 3> m_MeanBgr = {{104.007965f, 116.669472f, 122.675102f}};
39  const std::vector<ImageSet> m_ImageSet;
40 };
std::pair< const std::string, unsigned int > ImageSet
Caffe requires BGR images, not normalized, mean adjusted and resized using smooth resize of STB libra...
+
std::unique_ptr< TTestCaseData > GetTestCaseData(unsigned int testCaseId)
+ + + + +
CaffePreprocessor(const std::string &binaryFileDirectory, unsigned int width=227, unsigned int height=227, const std::vector< ImageSet > &imageSet=std::vector< ImageSet >())
+
+
+ + + + -- cgit v1.2.1