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 --- ...ctarmnn_1_1_q_symm_s8_quantization_scheme.xhtml | 251 +++++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 20.02/structarmnn_1_1_q_symm_s8_quantization_scheme.xhtml (limited to '20.02/structarmnn_1_1_q_symm_s8_quantization_scheme.xhtml') diff --git a/20.02/structarmnn_1_1_q_symm_s8_quantization_scheme.xhtml b/20.02/structarmnn_1_1_q_symm_s8_quantization_scheme.xhtml new file mode 100644 index 0000000000..67fa2b94b9 --- /dev/null +++ b/20.02/structarmnn_1_1_q_symm_s8_quantization_scheme.xhtml @@ -0,0 +1,251 @@ + + + + + + + + + + + + + +ArmNN: QSymmS8QuantizationScheme Struct Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
QSymmS8QuantizationScheme Struct Reference
+
+
+ +

#include <NetworkQuantizationScheme.hpp>

+
+Inheritance diagram for QSymmS8QuantizationScheme:
+
+
+ + +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 100 of file NetworkQuantizationScheme.hpp.

+

Member Function Documentation

+ +

◆ ComputeScheme()

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

Implements IQuantizationScheme.

+ +

Definition at line 102 of file NetworkQuantizationScheme.hpp.

+ +

References IQuantizationScheme::NumBits().

+
103  {
104  if (min > max)
105  {
106  throw InvalidArgumentException("min > max will result in invalid quantization.");
107  }
108 
109  // To avoid dividing by zero when quantizing a zero filled tensor
110  if (min == 0.0 && max == 0.0)
111  {
112  max = 1.0;
113  }
114 
115  double highest = (1 << (NumBits()-1)) - 1; // (numbits-1) accounts for the sign bit
116 
117  double extent = std::max(std::abs(min), std::abs(max));
118  double scale = extent / highest;
119 
120  return std::make_pair(static_cast<float>(scale), 0);
121  }
+
+
+
+ +

◆ GetDataType()

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

Implements IQuantizationScheme.

+ +

Definition at line 125 of file NetworkQuantizationScheme.hpp.

+ +

References armnn::QSymmS8.

+ +
+
+ +

◆ NumBits()

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

Implements IQuantizationScheme.

+ +

Definition at line 123 of file NetworkQuantizationScheme.hpp.

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