aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNattapat Chaimanowong <nattapat.chaimanowong@arm.com>2019-05-09 10:13:20 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-05-10 08:30:55 +0000
commit724e48013142562b7f09c9c819f57c314c4ee3d4 (patch)
tree935b425961ccb13a488708312bcc70b3b32fc87e /include
parent5fa83938592db420914903235daf3f1d5c97d6bc (diff)
downloadarmnn-724e48013142562b7f09c9c819f57c314c4ee3d4.tar.gz
IVGCVSW-3061 Modify NetworkQuantizer to support option to preserve input/output types
* Also add unit tests for new preserve type option Signed-off-by: Nattapat Chaimanowong <nattapat.chaimanowong@arm.com> Change-Id: I860759072f2e3546698118d1bcd5e79eb4e805ec
Diffstat (limited to 'include')
-rw-r--r--include/armnnQuantizer/INetworkQuantizer.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/armnnQuantizer/INetworkQuantizer.hpp b/include/armnnQuantizer/INetworkQuantizer.hpp
index 89548d1057..826b077f6e 100644
--- a/include/armnnQuantizer/INetworkQuantizer.hpp
+++ b/include/armnnQuantizer/INetworkQuantizer.hpp
@@ -14,10 +14,16 @@ namespace armnn
struct QuantizerOptions
{
- QuantizerOptions() : m_ActivationFormat(DataType::QuantisedAsymm8) {}
- QuantizerOptions(DataType activationFormat) : m_ActivationFormat(activationFormat) {}
+ QuantizerOptions() : QuantizerOptions(DataType::QuantisedAsymm8, false) {}
+
+ QuantizerOptions(DataType activationFormat) : QuantizerOptions(activationFormat, false) {}
+
+ QuantizerOptions(DataType activationFormat, bool preserveType)
+ : m_ActivationFormat(activationFormat)
+ , m_PreserveType(preserveType) {}
DataType m_ActivationFormat;
+ bool m_PreserveType;
};
using INetworkQuantizerPtr = std::unique_ptr<class INetworkQuantizer, void(*)(INetworkQuantizer* quantizer)>;