diff options
author | Matthew Sloyan <matthew.sloyan@arm.com> | 2020-11-09 12:25:05 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2020-11-10 16:50:49 +0000 |
commit | 0d35a93d68e321e8c4b16baa8b9754b98cc9faf3 (patch) | |
tree | d4143415dbd8d7ea2b65b802fe9e18ead9a09e75 /delegate/src/DelegateUtils.hpp | |
parent | 8b9858d891439fd1b0710e5d245e2116a3b88d30 (diff) | |
download | armnn-0d35a93d68e321e8c4b16baa8b9754b98cc9faf3.tar.gz |
IVGCVSW-5398 TfLiteDelegate: Implement the Quantization operators
* Enabled quantization operators DEQUANTIZE and QUANTIZE.
* Implemented unit tests for quantization operators.
* Added utils function for checking if affine quantization.
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: I84b5c75bda629d9234f5ed198b04f527705a54aa
Diffstat (limited to 'delegate/src/DelegateUtils.hpp')
-rw-r--r-- | delegate/src/DelegateUtils.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/delegate/src/DelegateUtils.hpp b/delegate/src/DelegateUtils.hpp index 00279f630d..f12aee9d2b 100644 --- a/delegate/src/DelegateUtils.hpp +++ b/delegate/src/DelegateUtils.hpp @@ -104,6 +104,16 @@ bool IsDynamicTensor(const TfLiteTensor& tfLiteTensor) return false; } +bool IsAffineQuantization(const TfLiteTensor& tfLiteTensor) +{ + auto quantizationInfo = tfLiteTensor.quantization; + if (quantizationInfo.type == kTfLiteAffineQuantization) + { + return true; + } + return false; +} + TfLiteStatus Connect(armnn::IConnectableLayer* layer, TfLiteNode* tfLiteNode, armnnDelegate::DelegateData& data) |