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/_quantization_data_set_tests_8cpp.xhtml | 212 ++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) create mode 100644 20.02/_quantization_data_set_tests_8cpp.xhtml (limited to '20.02/_quantization_data_set_tests_8cpp.xhtml') diff --git a/20.02/_quantization_data_set_tests_8cpp.xhtml b/20.02/_quantization_data_set_tests_8cpp.xhtml new file mode 100644 index 0000000000..083fa6dfbd --- /dev/null +++ b/20.02/_quantization_data_set_tests_8cpp.xhtml @@ -0,0 +1,212 @@ + + + + + + + + + + + + + +ArmNN: src/armnnQuantizer/test/QuantizationDataSetTests.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
QuantizationDataSetTests.cpp File Reference
+
+
+
#include <boost/test/unit_test.hpp>
+#include "../QuantizationDataSet.hpp"
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <map>
+#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/fstream.hpp>
+#include <boost/filesystem/path.hpp>
+#include <boost/optional/optional.hpp>
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define BOOST_FILESYSTEM_NO_DEPRECATED
 
+ + + + + +

+Functions

 BOOST_FIXTURE_TEST_CASE (CheckDataSet, CsvTestHelper)
 
 BOOST_AUTO_TEST_SUITE_END ()
 
+

Macro Definition Documentation

+ +

◆ BOOST_FILESYSTEM_NO_DEPRECATED

+ +
+
+ + + + +
#define BOOST_FILESYSTEM_NO_DEPRECATED
+
+ +

Definition at line 14 of file QuantizationDataSetTests.cpp.

+ +
+
+

Function Documentation

+ +

◆ BOOST_AUTO_TEST_SUITE_END()

+ +
+
+ + + + + + + +
BOOST_AUTO_TEST_SUITE_END ()
+
+ +

Referenced by BOOST_FIXTURE_TEST_CASE().

+ +
+
+ +

◆ BOOST_FIXTURE_TEST_CASE()

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (CheckDataSet ,
CsvTestHelper  
)
+
+ +

Definition at line 114 of file QuantizationDataSetTests.cpp.

+ +

References BOOST_AUTO_TEST_SUITE_END(), and QuantizationDataSet::IsEmpty().

+
115 {
116 
117  std::map<int, std::vector<float>> csvData;
118  csvData.insert(std::pair<int, std::vector<float>>(0, { 0.111111f, 0.222222f, 0.333333f }));
119  csvData.insert(std::pair<int, std::vector<float>>(1, { 0.444444f, 0.555555f, 0.666666f }));
120  csvData.insert(std::pair<int, std::vector<float>>(2, { 0.777777f, 0.888888f, 0.999999f }));
121 
122  std::string myCsvFile = CsvTestHelper::CreateTempCsvFile(csvData);
123  QuantizationDataSet dataSet(myCsvFile);
124  BOOST_TEST(!dataSet.IsEmpty());
125 
126  int csvRow = 0;
127  for(armnnQuantizer::QuantizationInput input : dataSet)
128  {
129  BOOST_TEST(input.GetPassId() == csvRow);
130 
131  BOOST_TEST(input.GetLayerBindingIds().size() == 1);
132  BOOST_TEST(input.GetLayerBindingIds()[0] == 0);
133  BOOST_TEST(input.GetDataForEntry(0).size() == 3);
134 
135  // Check that QuantizationInput data for binding ID 0 corresponds to float values
136  // used for populating the CSV file using by QuantizationDataSet
137  BOOST_TEST(input.GetDataForEntry(0).at(0) == csvData.at(csvRow).at(0));
138  BOOST_TEST(input.GetDataForEntry(0).at(1) == csvData.at(csvRow).at(1));
139  BOOST_TEST(input.GetDataForEntry(0).at(2) == csvData.at(csvRow).at(2));
140  ++csvRow;
141  }
142 }
QuantizationDataSet is a structure which is created after parsing a quantization CSV file...
+
QuantizationInput for specific pass ID, can list a corresponding raw data file for each LayerBindingI...
+
+
+
+
+
+ + + + -- cgit v1.2.1