From de36e4a9c299028e792c3a5bd99ad0816d806077 Mon Sep 17 00:00:00 2001 From: Ryan OShea Date: Fri, 13 Mar 2020 16:26:19 +0000 Subject: IVGCVSW-3726 Upload ArmNN Doxygen files * Upload current ArmNN Doxygen files Signed-off-by: Ryan OShea Change-Id: I8989ed16ee40a99a4495b100bd009cf3e24a7285 --- ...ctarmnn_1_1_q_asymm_s8_quantization_scheme.html | 237 +++++++++++++++++++++ 1 file changed, 237 insertions(+) create mode 100644 Documentation/structarmnn_1_1_q_asymm_s8_quantization_scheme.html (limited to 'Documentation/structarmnn_1_1_q_asymm_s8_quantization_scheme.html') diff --git a/Documentation/structarmnn_1_1_q_asymm_s8_quantization_scheme.html b/Documentation/structarmnn_1_1_q_asymm_s8_quantization_scheme.html new file mode 100644 index 0000000000..3f8e8b898b --- /dev/null +++ b/Documentation/structarmnn_1_1_q_asymm_s8_quantization_scheme.html @@ -0,0 +1,237 @@ + + + + + + + +ArmNN: QAsymmS8QuantizationScheme Struct Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
ArmNN +  NotReleased +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
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