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 --- .../test/layerTests/UnidirectionalSequenceLstmTestImpl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backends/backendsCommon/test/layerTests/UnidirectionalSequenceLstmTestImpl.cpp') diff --git a/src/backends/backendsCommon/test/layerTests/UnidirectionalSequenceLstmTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/UnidirectionalSequenceLstmTestImpl.cpp index 6effa9c85d..4a63d39800 100644 --- a/src/backends/backendsCommon/test/layerTests/UnidirectionalSequenceLstmTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/UnidirectionalSequenceLstmTestImpl.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2021 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2021, 2023 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -26,7 +26,7 @@ UnidirectionalSequenceLstmTimeMajorSingleBatchTestImpl( const std::vector& outputExpected, const armnn::TensorShape& inputShape, const armnn::TensorShape& outputExpectedShape, - float qScale = 0.0f, + float qScale = 1.0f, int32_t qOffset = 0, armnn::DataType constantDataType = armnn::DataType::Float32) { @@ -222,7 +222,7 @@ LayerTestResult UnidirectionalSequenceLstmLayerFloat32TestImpl( const std::vector& outputExpected, const armnn::TensorShape& inputShape, const armnn::TensorShape& outputExpectedShape, - float qScale = 0.0f, + float qScale = 1.0f, int32_t qOffset = 0, armnn::DataType constantDataType = armnn::DataType::Float32) { IgnoreUnused(memoryManager); @@ -411,7 +411,7 @@ UnidirectionalSequenceLstmLayerFloat32TimeMajorTestImpl( const std::vector& outputExpected, const armnn::TensorShape& inputShape, const armnn::TensorShape& outputExpectedShape, - float qScale = 0.0f, + float qScale = 1.0f, int32_t qOffset = 0, armnn::DataType constantDataType = armnn::DataType::Float32) { IgnoreUnused(memoryManager); -- cgit v1.2.1