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

#include <NetworkQuantizationScheme.hpp>

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

+

Member Function Documentation

+ +

◆ ComputeScheme()

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

Implements IQuantizationScheme.

+ +

Definition at line 130 of file NetworkQuantizationScheme.hpp.

+ +

References IQuantizationScheme::NumBits().

+
131  {
132  if (min > max)
133  {
134  throw InvalidArgumentException("min > max will result in invalid quantization.");
135  }
136 
137  // To avoid dividing by zero when quantizing a zero filled tensor
138  if (min == 0.0 && max == 0.0)
139  {
140  max = 1.0;
141  }
142 
143  double highest = (1 << (NumBits()-1)) - 1; // (numbits-1) accounts for the sign bit
144 
145  double extent = std::max(std::abs(min), std::abs(max));
146  double scale = extent / highest;
147 
148  return std::make_pair(static_cast<float>(scale), 0);
149 
150  }
+
+
+
+ +

◆ GetDataType()

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

Implements IQuantizationScheme.

+ +

Definition at line 154 of file NetworkQuantizationScheme.hpp.

+ +

References armnn::QSymmS16.

+ +
+
+ +

◆ NumBits()

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

Implements IQuantizationScheme.

+ +

Definition at line 152 of file NetworkQuantizationScheme.hpp.

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