aboutsummaryrefslogtreecommitdiff
path: root/delegate/src
diff options
context:
space:
mode:
authorKeith Davis <keith.davis@arm.com>2021-09-28 16:43:24 +0100
committerKeithARM <keith.davis@arm.com>2021-09-29 11:24:52 +0000
commit9a701c840f9e2fdc16117321658c9d4d7b4ccb60 (patch)
tree93f59b483847741420eb4e71e69968187aa3508b /delegate/src
parente89dd69474e237bed1066849ea1f6a4893e4a1a4 (diff)
downloadarmnn-9a701c840f9e2fdc16117321658c9d4d7b4ccb60.tar.gz
IVGCVSW-6160 Support building tensorflowlite 2.5 through cmake
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I825f09d008505e701d42b79be936f4da24620c06
Diffstat (limited to 'delegate/src')
-rw-r--r--delegate/src/DelegateUtils.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/delegate/src/DelegateUtils.hpp b/delegate/src/DelegateUtils.hpp
index 8c7ba25e15..e408dba138 100644
--- a/delegate/src/DelegateUtils.hpp
+++ b/delegate/src/DelegateUtils.hpp
@@ -16,6 +16,7 @@
#include <tensorflow/lite/c/builtin_op_data.h>
#include <tensorflow/lite/c/common.h>
#include <tensorflow/lite/minimal_logging.h>
+#include <tensorflow/lite/version.h>
#include "tensorflow/lite/kernels/kernel_util.h"
@@ -294,7 +295,12 @@ TfLiteStatus FusedActivation(TfLiteContext* tfLiteContext,
activationDesc.m_Function = armnn::ActivationFunction::ReLu;
break;
}
+// The name of kTfLiteActRelu1 changed after TF Lite v2.3
+#if TF_MAJOR_VERSION > 2 || (TF_MAJOR_VERSION == 2 && TF_MINOR_VERSION > 3)
+ case kTfLiteActReluN1To1:
+#else
case kTfLiteActRelu1:
+#endif
{
activationDesc.m_Function = armnn::ActivationFunction::BoundedReLu;
activationDesc.m_A = 1.0f;