aboutsummaryrefslogtreecommitdiff
path: root/src/backends/backendsCommon/test/layerTests/SoftmaxTestImpl.cpp
diff options
context:
space:
mode:
authorAron Virginas-Tar <Aron.Virginas-Tar@arm.com>2019-10-22 10:00:28 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-10-25 15:01:24 +0000
commit48623a0f6f4681ce0d9525b1587b7f96bfd58519 (patch)
treef5dbf25937e7b6641274e0953d09ca84acb51772 /src/backends/backendsCommon/test/layerTests/SoftmaxTestImpl.cpp
parentc82c8732fb514b412012002bd951a84039eca696 (diff)
downloadarmnn-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/SoftmaxTestImpl.cpp')
-rw-r--r--src/backends/backendsCommon/test/layerTests/SoftmaxTestImpl.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/backends/backendsCommon/test/layerTests/SoftmaxTestImpl.cpp b/src/backends/backendsCommon/test/layerTests/SoftmaxTestImpl.cpp
index c0b62aa640..a5f6477a28 100644
--- a/src/backends/backendsCommon/test/layerTests/SoftmaxTestImpl.cpp
+++ b/src/backends/backendsCommon/test/layerTests/SoftmaxTestImpl.cpp
@@ -5,13 +5,13 @@
#include "SoftmaxTestImpl.hpp"
+#include <QuantizeHelper.hpp>
#include <ResolveType.hpp>
#include <armnn/ArmNN.hpp>
#include <backendsCommon/CpuTensorHandle.hpp>
-#include <backendsCommon/test/QuantizeHelper.hpp>
#include <backendsCommon/test/TensorCopyUtils.hpp>
#include <backendsCommon/test/WorkloadTestUtils.hpp>
@@ -85,8 +85,7 @@ LayerTestResult<T, n> SimpleSoftmaxBaseTestImpl(
LayerTestResult<T, n> ret(outputTensorInfo);
// Each row is independently softmax'd.
- auto input = MakeTensor<T, n>(inputTensorInfo, std::vector<T>(
- QuantizedVector<T>(qScale, qOffset, inputData)));
+ auto input = MakeTensor<T, n>(inputTensorInfo, armnnUtils::QuantizedVector<T>(inputData, qScale, qOffset));
std::unique_ptr<armnn::ITensorHandle> inputHandle = workloadFactory.CreateTensorHandle(inputTensorInfo);
std::unique_ptr<armnn::ITensorHandle> outputHandle = workloadFactory.CreateTensorHandle(outputTensorInfo);
@@ -111,8 +110,7 @@ LayerTestResult<T, n> SimpleSoftmaxBaseTestImpl(
CopyDataFromITensorHandle(ret.output.origin(), outputHandle.get());
- std::vector<T> expectedOutput = std::vector<T>(
- QuantizedVector<T>(qScale, qOffset, outputData));
+ std::vector<T> expectedOutput = armnnUtils::QuantizedVector<T>(outputData, qScale, qOffset);
ret.outputExpected = MakeTensor<T, n>(outputTensorInfo, expectedOutput);
return ret;