From acb3ec51e51542d3011ed87842f87c2261abaaff Mon Sep 17 00:00:00 2001 From: Teresa Charlin Date: Mon, 3 Apr 2023 19:57:00 +0100 Subject: 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 Change-Id: Ibc3eecc281de516c2cc706e17bde01c64ff9556e --- src/backends/backendsCommon/test/layerTests/ActivationTestImpl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/backends/backendsCommon/test/layerTests/ActivationTestImpl.cpp') diff --git a/src/backends/backendsCommon/test/layerTests/ActivationTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/ActivationTestImpl.cpp index 1ef47ddf7b..1dcbdfac9e 100644 --- a/src/backends/backendsCommon/test/layerTests/ActivationTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/ActivationTestImpl.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2017 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2017, 2023 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -316,7 +316,7 @@ LayerTestResult ConstantLinearActivationTestCommon( armnn::IWorkloadFactory& workloadFactory, const armnn::IBackendInternal::IMemoryManagerSharedPtr& memoryManager, const armnn::ITensorHandleFactory& tensorHandleFactory, - float qScale = 0.0f, + float qScale = 1.0f, int32_t qOffset = 0) { IgnoreUnused(memoryManager); @@ -1226,7 +1226,7 @@ LayerTestResult CompareActivationTestImpl( const armnn::ITensorHandleFactory& refTensorHandleFactory, armnn::ActivationFunction f, unsigned int batchSize = 5, - float qScale = 0.0f, + float qScale = 1.0f, int32_t qOffset = 0) { IgnoreUnused(memoryManager); -- cgit v1.2.1