diff options
author | Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> | 2019-10-22 10:00:28 +0100 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-10-25 15:01:24 +0000 |
commit | 48623a0f6f4681ce0d9525b1587b7f96bfd58519 (patch) | |
tree | f5dbf25937e7b6641274e0953d09ca84acb51772 /src/backends/backendsCommon/test/layerTests/TransposeConvolution2dTestImpl.hpp | |
parent | c82c8732fb514b412012002bd951a84039eca696 (diff) | |
download | armnn-48623a0f6f4681ce0d9525b1587b7f96bfd58519.tar.gz |
IVGCVSW-4018 Move QuantizeHelper.hpp to armnnUtils
* Moved QuntizeHelper.hpp to armnnUtils
* Reordered parameters for QuantizedVector and added default
values for qScale and qOffset to make life easier when
using the function for non-quantized types such as Float16
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
Change-Id: I28c263dfa425f1316feccb4116839a84f5d568e5
Diffstat (limited to 'src/backends/backendsCommon/test/layerTests/TransposeConvolution2dTestImpl.hpp')
-rw-r--r-- | src/backends/backendsCommon/test/layerTests/TransposeConvolution2dTestImpl.hpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/backends/backendsCommon/test/layerTests/TransposeConvolution2dTestImpl.hpp b/src/backends/backendsCommon/test/layerTests/TransposeConvolution2dTestImpl.hpp index 7391f9c198..a2b477cc2d 100644 --- a/src/backends/backendsCommon/test/layerTests/TransposeConvolution2dTestImpl.hpp +++ b/src/backends/backendsCommon/test/layerTests/TransposeConvolution2dTestImpl.hpp @@ -8,12 +8,12 @@ #include <armnn/ArmNN.hpp> #include <Permute.hpp> +#include <QuantizeHelper.hpp> #include <ResolveType.hpp> #include <backendsCommon/CpuTensorHandle.hpp> #include <backendsCommon/test/DataLayoutUtils.hpp> -#include <backendsCommon/test/QuantizeHelper.hpp> #include <backendsCommon/test/TensorCopyUtils.hpp> #include <backendsCommon/test/WorkloadTestUtils.hpp> @@ -146,14 +146,16 @@ LayerTestResult<T, 4> TransposeConvolution2dTest( TensorData<T> input = { inputInfo, - QuantizedVector<T>(inputInfo.GetQuantizationScale(), inputInfo.GetQuantizationOffset(), inputData) + armnnUtils::QuantizedVector<T>(inputData, inputInfo.GetQuantizationScale(), inputInfo.GetQuantizationOffset()) }; // set up weights TensorData<T> weights = { weightsInfo, - QuantizedVector<T>(weightsInfo.GetQuantizationScale(), weightsInfo.GetQuantizationOffset(), weightsData) + armnnUtils::QuantizedVector<T>(weightsData, + weightsInfo.GetQuantizationScale(), + weightsInfo.GetQuantizationOffset()) }; // set up biases @@ -164,7 +166,9 @@ LayerTestResult<T, 4> TransposeConvolution2dTest( TensorData<BT> biases = { biasesInfo, - QuantizedVector<BT>(biasesInfo.GetQuantizationScale(), biasesInfo.GetQuantizationOffset(), biasesData) + armnnUtils::QuantizedVector<BT>(biasesData, + biasesInfo.GetQuantizationScale(), + biasesInfo.GetQuantizationOffset()) }; optionalBiases = Optional<TensorData<BT>>(biases); @@ -186,9 +190,9 @@ LayerTestResult<T, 4> TransposeConvolution2dTest( LayerTestResult<T, 4> testResult(outputInfo); testResult.output = MakeTensor<T, 4>(outputInfo, output.second); testResult.outputExpected = MakeTensor<T, 4>(outputInfo, - QuantizedVector<T>(outputInfo.GetQuantizationScale(), - outputInfo.GetQuantizationOffset(), - expectedOutputData)); + armnnUtils::QuantizedVector<T>(expectedOutputData, + outputInfo.GetQuantizationScale(), + outputInfo.GetQuantizationOffset())); return testResult; } |