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 --- ...tarmnn_1_1_q_asymm_s8_quantization_scheme.xhtml | 251 +++++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 21.02/structarmnn_1_1_q_asymm_s8_quantization_scheme.xhtml (limited to '21.02/structarmnn_1_1_q_asymm_s8_quantization_scheme.xhtml') diff --git a/21.02/structarmnn_1_1_q_asymm_s8_quantization_scheme.xhtml b/21.02/structarmnn_1_1_q_asymm_s8_quantization_scheme.xhtml new file mode 100644 index 0000000000..2bc52f9ed8 --- /dev/null +++ b/21.02/structarmnn_1_1_q_asymm_s8_quantization_scheme.xhtml @@ -0,0 +1,251 @@ + + + + + + + + + + + + + +ArmNN: QAsymmS8QuantizationScheme Struct Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
QAsymmS8QuantizationScheme Struct Reference
+
+
+ +

#include <NetworkQuantizationScheme.hpp>

+
+Inheritance diagram for QAsymmS8QuantizationScheme:
+
+
+ + +IQuantizationScheme + +
+ + + + + + + + + + + +

+Public Member Functions

OffsetScalePair ComputeScheme (double min, double max) const override
 
int NumBits () const override
 
DataType GetDataType () const override
 
- Public Member Functions inherited from IQuantizationScheme
virtual ~IQuantizationScheme ()
 
+

Detailed Description

+
+

Definition at line 64 of file NetworkQuantizationScheme.hpp.

+

Member Function Documentation

+ +

◆ ComputeScheme()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
OffsetScalePair ComputeScheme (double min,
double max 
) const
+
+inlineoverridevirtual
+
+ +

Implements IQuantizationScheme.

+ +

Definition at line 66 of file NetworkQuantizationScheme.hpp.

+ +

References IQuantizationScheme::NumBits().

+
67  {
68  if (min > max)
69  {
70  throw InvalidArgumentException("min > max will result in invalid quantization.");
71  }
72 
73  double highest = (1 << NumBits()) - 1;
74 
75  min = std::min(0.0, min); // min <= 0.0
76  max = std::max(0.0, max); // max >= 0.0
77 
78  // To avoid dividing by zero when quantizing a zero filled tensor
79  if (min == 0.0 && max == 0.0)
80  {
81  max = 1.0;
82  }
83 
84  // Assumes quantization range [0-255]
85  double scale = (max-min) / highest ;
86  double offset = - min / scale;
87 
88  //Clamp 0 to Highest
89  offset = std::max(0.0, std::min(highest, offset));
90 
91  //-128 on offset to cast to signed range
92  return std::make_pair(static_cast<float>(scale), static_cast<int>(std::round(offset)-128));
93  }
+
+
+
+ +

◆ GetDataType()

+ +
+
+ + + + + +
+ + + + + + + +
DataType GetDataType () const
+
+inlineoverridevirtual
+
+ +

Implements IQuantizationScheme.

+ +

Definition at line 97 of file NetworkQuantizationScheme.hpp.

+ +

References armnn::QAsymmS8.

+ +
+
+ +

◆ NumBits()

+ +
+
+ + + + + +
+ + + + + + + +
int NumBits () const
+
+inlineoverridevirtual
+
+ +

Implements IQuantizationScheme.

+ +

Definition at line 95 of file NetworkQuantizationScheme.hpp.

+
95 { return 8; }
+
+
+
The documentation for this struct was generated from the following file: +
+
+ + + + -- cgit v1.2.1