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/FullyConnectedTestImpl.cpp | |
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/FullyConnectedTestImpl.cpp')
-rw-r--r-- | src/backends/backendsCommon/test/layerTests/FullyConnectedTestImpl.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/backends/backendsCommon/test/layerTests/FullyConnectedTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/FullyConnectedTestImpl.cpp index c84b941e1f..cf101eeee1 100644 --- a/src/backends/backendsCommon/test/layerTests/FullyConnectedTestImpl.cpp +++ b/src/backends/backendsCommon/test/layerTests/FullyConnectedTestImpl.cpp @@ -7,6 +7,8 @@ #include <armnn/ArmNN.hpp> +#include <QuantizeHelper.hpp> + #include <backendsCommon/CpuTensorHandle.hpp> #include <backendsCommon/test/DataTypeUtils.hpp> @@ -191,15 +193,17 @@ LayerTestResult<T, 2> FullyConnectedLargeTestCommon( LayerTestResult<T, 2> result(outputTensorInfo); boost::multi_array<T, 4> input = MakeTensor<T, 4>(inputTensorInfo, - QuantizedVector<T>(qScale, qOffset, { + armnnUtils::QuantizedVector<T>({ 1.0f, 10.0f, 100.0f, 1000.0f, 10000.0f, - }) + }, + qScale, qOffset) ); boost::multi_array<T, 2> weights = MakeTensor<T, 2>(weightsDesc, - QuantizedVector<T>(qScale, qOffset, { + armnnUtils::QuantizedVector<T>({ 2.0f, 3.0f, 4.0f, 5.0f, 6.0f - }) + }, + qScale, qOffset) ); std::vector<T> biasValues({900000.f}); @@ -215,10 +219,7 @@ LayerTestResult<T, 2> FullyConnectedLargeTestCommon( ); result.outputExpected = MakeTensor<T, 2>(outputTensorInfo, - QuantizedVector<T>(qScale, qOffset, { - 965432.0f, - }) - ); + armnnUtils::QuantizedVector<T>({ 965432.0f }, qScale, qOffset)); return result; } |