diff options
Diffstat (limited to 'samples/common/include/ArmnnUtils')
-rw-r--r-- | samples/common/include/ArmnnUtils/ArmnnNetworkExecutor.hpp | 18 |
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(); |