aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTeresa Charlin <teresa.charlinreyes@arm.com>2023-04-03 19:57:00 +0100
committerColm Donelan <colm.donelan@arm.com>2023-04-18 17:27:41 +0000
commitacb3ec51e51542d3011ed87842f87c2261abaaff (patch)
treeb1ed73756c1db4a8e71b18a5a8256f42bb49341b /include
parent8294e96a2f0f4ad3f5cd261079a6f90eee40142c (diff)
downloadarmnn-acb3ec51e51542d3011ed87842f87c2261abaaff.tar.gz
GitHub #719 Set quantization parameter scale to 1.0, instead of 0.0.
* Arm NN does not account for int8 or uint8 not quantized types, Tensorflow does. Not quantized int8 and uint8 is the same as quantized int8 and uint8 with scale = 1.0 and offset= 0 Default offset/zero_point was already 0, this review sets the default scale to 1.0. Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ibc3eecc281de516c2cc706e17bde01c64ff9556e
Diffstat (limited to 'include')
-rw-r--r--include/armnn/Tensor.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/armnn/Tensor.hpp b/include/armnn/Tensor.hpp
index 46859c4887..1bbc19f2f1 100644
--- a/include/armnn/Tensor.hpp
+++ b/include/armnn/Tensor.hpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017,2022 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017,2022-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#pragma once
@@ -157,14 +157,14 @@ public:
TensorInfo(const TensorShape& shape,
DataType dataType,
- float quantizationScale = 0.0f,
+ float quantizationScale = 1.0f,
int32_t quantizationOffset = 0,
bool isConstant = false);
TensorInfo(unsigned int numDimensions,
const unsigned int* dimensionSizes,
DataType dataType,
- float quantizationScale = 0.0f,
+ float quantizationScale = 1.0f,
int32_t quantizationOffset = 0,
bool isConstant = false);