From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- 21.02/_quantization_data_set_tests_8cpp.xhtml | 187 ++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 21.02/_quantization_data_set_tests_8cpp.xhtml (limited to '21.02/_quantization_data_set_tests_8cpp.xhtml') diff --git a/21.02/_quantization_data_set_tests_8cpp.xhtml b/21.02/_quantization_data_set_tests_8cpp.xhtml new file mode 100644 index 0000000000..f4c26f8bd3 --- /dev/null +++ b/21.02/_quantization_data_set_tests_8cpp.xhtml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + +ArmNN: src/armnnQuantizer/test/QuantizationDataSetTests.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
QuantizationDataSetTests.cpp File Reference
+
+
+
#include <boost/test/unit_test.hpp>
+#include "../QuantizationDataSet.hpp"
+#include <armnn/Optional.hpp>
+#include <Filesystem.hpp>
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <map>
+
+

Go to the source code of this file.

+ + + + + + +

+Functions

 BOOST_FIXTURE_TEST_CASE (CheckDataSet, CsvTestHelper)
 
 BOOST_AUTO_TEST_SUITE_END ()
 
+

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 110 of file QuantizationDataSetTests.cpp.

+ +

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

+
111 {
112 
113  std::map<int, std::vector<float>> csvData;
114  csvData.insert(std::pair<int, std::vector<float>>(0, { 0.111111f, 0.222222f, 0.333333f }));
115  csvData.insert(std::pair<int, std::vector<float>>(1, { 0.444444f, 0.555555f, 0.666666f }));
116  csvData.insert(std::pair<int, std::vector<float>>(2, { 0.777777f, 0.888888f, 0.999999f }));
117 
118  std::string myCsvFile = CsvTestHelper::CreateTempCsvFile(csvData);
119  QuantizationDataSet dataSet(myCsvFile);
120  BOOST_TEST(!dataSet.IsEmpty());
121 
122  int csvRow = 0;
123  for(armnnQuantizer::QuantizationInput input : dataSet)
124  {
125  BOOST_TEST(input.GetPassId() == csvRow);
126 
127  BOOST_TEST(input.GetLayerBindingIds().size() == 1);
128  BOOST_TEST(input.GetLayerBindingIds()[0] == 0);
129  BOOST_TEST(input.GetDataForEntry(0).size() == 3);
130 
131  // Check that QuantizationInput data for binding ID 0 corresponds to float values
132  // used for populating the CSV file using by QuantizationDataSet
133  BOOST_TEST(input.GetDataForEntry(0).at(0) == csvData.at(csvRow).at(0));
134  BOOST_TEST(input.GetDataForEntry(0).at(1) == csvData.at(csvRow).at(1));
135  BOOST_TEST(input.GetDataForEntry(0).at(2) == csvData.at(csvRow).at(2));
136  ++csvRow;
137  }
138 }
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