diff options
author | Kevin May <kevin.may@arm.com> | 2021-04-22 16:51:18 +0100 |
---|---|---|
committer | Kevin May <kevin.may@arm.com> | 2021-04-27 15:02:45 +0000 |
commit | 4a621c43174b6bdd9dc0bff839b245bc2139d6a6 (patch) | |
tree | 88b2bbc803284e7c5051c8812a468e5f3c834b9c /src/armnn/NetworkQuantizerUtils.cpp | |
parent | 65542e4f250a66fd0aba0c1b509e11cb518ee2d5 (diff) | |
download | armnn-4a621c43174b6bdd9dc0bff839b245bc2139d6a6.tar.gz |
IVGCVSW-5719 Remove Quantizer
Signed-off-by: Kevin May <kevin.may@arm.com>
Change-Id: I8a29df03afdd6f1cc8413b219e179272cd2d51cf
Diffstat (limited to 'src/armnn/NetworkQuantizerUtils.cpp')
-rw-r--r-- | src/armnn/NetworkQuantizerUtils.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/armnn/NetworkQuantizerUtils.cpp b/src/armnn/NetworkQuantizerUtils.cpp deleted file mode 100644 index dd0affde25..0000000000 --- a/src/armnn/NetworkQuantizerUtils.cpp +++ /dev/null @@ -1,43 +0,0 @@ -// -// Copyright © 2017 Arm Ltd. All rights reserved. -// SPDX-License-Identifier: MIT -// - -#include "NetworkQuantizerUtils.hpp" - -#include <algorithm> -#include <cmath> -#include <stdint.h> - -namespace armnn -{ - -ConstTensor CreateQuantizedConst(const ConstTensor& tensor, std::vector<uint8_t>& backing) -{ - float scale = 0.0f; - int offset = 0; - - // Reserve the backing memory - backing.resize(tensor.GetInfo().GetNumElements()); - - DataType type = tensor.GetInfo().GetDataType(); - switch(type) - { - case DataType::Float32: - { - QuantizeConstant(static_cast<const float*>(tensor.GetMemoryArea()), - backing.data(), - backing.size(), - scale, - offset); - } - break; - default: - ARMNN_ASSERT_MSG(false, "Can't quantize unsupported data type"); - } - - TensorInfo qInfo(tensor.GetInfo().GetShape(), DataType::QAsymmU8, scale, offset); - return ConstTensor(qInfo, backing); -} - -} // namespace armnn |