aboutsummaryrefslogtreecommitdiff
path: root/samples/common/include/ArmnnUtils/ArmnnNetworkExecutor.hpp
diff options
context:
space:
mode:
authorGeorge Gekov <george.gekov@arm.com>2021-08-16 11:32:10 +0100
committerJim Flynn <jim.flynn@arm.com>2022-02-05 19:49:06 +0000
commit23c26277086c78704a17f0dae86da947816320c0 (patch)
tree88b02fd1fae3130256d059251788a7ef68d2831f /samples/common/include/ArmnnUtils/ArmnnNetworkExecutor.hpp
parent922b912fd2d462bac0809bac5669310ad1506310 (diff)
downloadarmnn-23c26277086c78704a17f0dae86da947816320c0.tar.gz
MLECO-2079 Adding the C++ KWS example
Signed-off-by: Eanna O Cathain <eanna.ocathain@arm.com> Change-Id: I81899bbfaada32f478c2e2fc6441eabb94d8d0fc
Diffstat (limited to 'samples/common/include/ArmnnUtils/ArmnnNetworkExecutor.hpp')
-rw-r--r--samples/common/include/ArmnnUtils/ArmnnNetworkExecutor.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/samples/common/include/ArmnnUtils/ArmnnNetworkExecutor.hpp b/samples/common/include/ArmnnUtils/ArmnnNetworkExecutor.hpp
index 96cc1d0184..9f1ef5475c 100644
--- a/samples/common/include/ArmnnUtils/ArmnnNetworkExecutor.hpp
+++ b/samples/common/include/ArmnnUtils/ArmnnNetworkExecutor.hpp
@@ -72,6 +72,10 @@ public:
int GetQuantizationOffset();
+ float GetOutputQuantizationScale(int tensorIndex);
+
+ int GetOutputQuantizationOffset(int tensorIndex);
+
/**
* @brief Runs inference on the provided input data, and stores the results in the provided InferenceResults object.
*
@@ -203,6 +207,20 @@ int ArmnnNetworkExecutor<Tout>::GetQuantizationOffset()
}
template <class Tout>
+float ArmnnNetworkExecutor<Tout>::GetOutputQuantizationScale(int tensorIndex)
+{
+ assert(this->m_outputLayerNamesList.size() > tensorIndex);
+ return this->m_outputBindingInfo[tensorIndex].second.GetQuantizationScale();
+}
+
+template <class Tout>
+int ArmnnNetworkExecutor<Tout>::GetOutputQuantizationOffset(int tensorIndex)
+{
+ assert(this->m_outputLayerNamesList.size() > tensorIndex);
+ return this->m_outputBindingInfo[tensorIndex].second.GetQuantizationOffset();
+}
+
+template <class Tout>
Size ArmnnNetworkExecutor<Tout>::GetImageAspectRatio()
{
const auto shape = m_inputBindingInfo.second.GetShape();