aboutsummaryrefslogtreecommitdiff
path: root/delegate/opaque/src/Normalization.hpp
diff options
context:
space:
mode:
authorMike Kelly <mike.kelly@arm.com>2023-08-03 10:42:11 +0100
committerTeresaARM <teresa.charlinreyes@arm.com>2023-08-03 22:04:58 +0000
commita280650509c4fbaa2508cdbc42e31f5a1805bd2a (patch)
tree1b60f4a2e6c7719ae873e8bdef2a76bd82c35033 /delegate/opaque/src/Normalization.hpp
parent7d1b1ca5b25a3aaeecebc537e8cbed2ee1ed3337 (diff)
downloadarmnn-a280650509c4fbaa2508cdbc42e31f5a1805bd2a.tar.gz
MLCE-1092 Added layerNames to opaque delegate
* All layers added through the opaque delegate will have a name that includes the nodeIndex from the tflite model. * Added utilities to OpaqueDelegateUtils to get the names for the layers. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Iadcc21646d0b6fcc2c524d6239211ad3af6b6577
Diffstat (limited to 'delegate/opaque/src/Normalization.hpp')
-rw-r--r--delegate/opaque/src/Normalization.hpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/delegate/opaque/src/Normalization.hpp b/delegate/opaque/src/Normalization.hpp
index c6ac6761d8..181e6e2fcd 100644
--- a/delegate/opaque/src/Normalization.hpp
+++ b/delegate/opaque/src/Normalization.hpp
@@ -82,7 +82,8 @@ TfLiteStatus VisitL2NormalizationOperator(DelegateData& delegateData,
}
// Add a L2Normalization layer
- armnn::IConnectableLayer* layer = delegateData.m_Network->AddL2NormalizationLayer(descriptor);
+ auto layerName = GetName(armnn::LayerType::L2Normalization, nodeIndex);
+ armnn::IConnectableLayer* layer = delegateData.m_Network->AddL2NormalizationLayer(descriptor, layerName.c_str());
layer->SetBackendId(setBackend);
ARMNN_ASSERT(layer != nullptr);
@@ -90,7 +91,7 @@ TfLiteStatus VisitL2NormalizationOperator(DelegateData& delegateData,
outputSlot.SetTensorInfo(outputTensorInfo);
// try to connect the Constant Inputs if there are any
- if(ProcessInputs(layer,delegateData, tfLiteContext, tfLiteNode) != kTfLiteOk )
+ if (ProcessInputs(layer, delegateData, tfLiteContext, tfLiteNode, nodeIndex) != kTfLiteOk)
{
return kTfLiteError;
}
@@ -183,7 +184,8 @@ TfLiteStatus VisitLocalResponseNormalizationOperator(DelegateData& delegateData,
}
// Add a Normalization layer
- armnn::IConnectableLayer* layer = delegateData.m_Network->AddNormalizationLayer(descriptor);
+ auto layerName = GetName(armnn::LayerType::Normalization, nodeIndex);
+ armnn::IConnectableLayer* layer = delegateData.m_Network->AddNormalizationLayer(descriptor, layerName.c_str());
layer->SetBackendId(setBackend);
ARMNN_ASSERT(layer != nullptr);
@@ -191,7 +193,7 @@ TfLiteStatus VisitLocalResponseNormalizationOperator(DelegateData& delegateData,
outputSlot.SetTensorInfo(outputTensorInfo);
// try to connect the Constant Inputs if there are any
- if(ProcessInputs(layer,delegateData, tfLiteContext, tfLiteNode) != kTfLiteOk )
+ if (ProcessInputs(layer, delegateData, tfLiteContext, tfLiteNode, nodeIndex) != kTfLiteOk)
{
return kTfLiteError;
}