aboutsummaryrefslogtreecommitdiff
path: root/tests/InferenceTest.hpp
diff options
context:
space:
mode:
authorDerek Lamberti <derek.lamberti@arm.com>2019-05-16 16:33:00 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-05-20 11:53:01 +0000
commitac73760a3731934ff7401d847eb2db7b9a77be02 (patch)
tree3a77741a67e10586d8fc48e14e587ebbd5788315 /tests/InferenceTest.hpp
parent58ef2c6f797f6bdb962016c519ebbc980ec2ed50 (diff)
downloadarmnn-ac73760a3731934ff7401d847eb2db7b9a77be02.tar.gz
IVGCVSW-3060 Classification tests display output value as raw float
Change-Id: I92a1e043d60fa2fe3414dc9339ef36204aca42e2 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Diffstat (limited to 'tests/InferenceTest.hpp')
-rw-r--r--tests/InferenceTest.hpp47
1 files changed, 0 insertions, 47 deletions
diff --git a/tests/InferenceTest.hpp b/tests/InferenceTest.hpp
index 3ebfdbcc3c..40c9e5e597 100644
--- a/tests/InferenceTest.hpp
+++ b/tests/InferenceTest.hpp
@@ -136,53 +136,6 @@ private:
std::vector<TContainer> m_Outputs;
};
-template <typename TDataType>
-struct ToFloat { }; // nothing defined for the generic case
-
-template <>
-struct ToFloat<float>
-{
- static inline float Convert(float value, const InferenceModelInternal::QuantizationParams &)
- {
- // assuming that float models are not quantized
- return value;
- }
-
- static inline float Convert(int value, const InferenceModelInternal::QuantizationParams &)
- {
- // assuming that float models are not quantized
- return static_cast<float>(value);
- }
-};
-
-template <>
-struct ToFloat<uint8_t>
-{
- static inline float Convert(uint8_t value,
- const InferenceModelInternal::QuantizationParams & quantizationParams)
- {
- return armnn::Dequantize<uint8_t>(value,
- quantizationParams.first,
- quantizationParams.second);
- }
-
- static inline float Convert(int value,
- const InferenceModelInternal::QuantizationParams & quantizationParams)
- {
- return armnn::Dequantize<uint8_t>(static_cast<uint8_t>(value),
- quantizationParams.first,
- quantizationParams.second);
- }
-
- static inline float Convert(float value,
- const InferenceModelInternal::QuantizationParams & quantizationParams)
- {
- return armnn::Dequantize<uint8_t>(static_cast<uint8_t>(value),
- quantizationParams.first,
- quantizationParams.second);
- }
-};
-
template <typename TTestCaseDatabase, typename TModel>
class ClassifierTestCase : public InferenceModelTestCase<TModel>
{