aboutsummaryrefslogtreecommitdiff
path: root/delegate/opaque/src/Prelu.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/Prelu.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/Prelu.hpp')
-rw-r--r--delegate/opaque/src/Prelu.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/delegate/opaque/src/Prelu.hpp b/delegate/opaque/src/Prelu.hpp
index 1a4037eb35..1c9f06d8b8 100644
--- a/delegate/opaque/src/Prelu.hpp
+++ b/delegate/opaque/src/Prelu.hpp
@@ -98,7 +98,8 @@ TfLiteStatus VisitPreluOperator(DelegateData& delegateData,
outputTensorInfo);
}
- armnn::IConnectableLayer* preluLayer = delegateData.m_Network->AddPreluLayer();
+ auto layerName = GetName(armnn::LayerType::Prelu, nodeIndex);
+ armnn::IConnectableLayer* preluLayer = delegateData.m_Network->AddPreluLayer(layerName.c_str());
ARMNN_ASSERT(preluLayer != nullptr);
bool isConstantAlpha = IsConstantTensor(tfLiteAlphaTensor);
@@ -108,7 +109,9 @@ TfLiteStatus VisitPreluOperator(DelegateData& delegateData,
{
auto constAlphaTensor = armnn::ConstTensor(alphaTensorInfo, TfLiteOpaqueTensorData(tfLiteAlphaTensor));
- armnn::IConnectableLayer* constLayer = delegateData.m_Network->AddConstantLayer(constAlphaTensor);
+ auto alphaName = GetName(armnn::LayerType::Constant, nodeIndex, "Alpha");
+ armnn::IConnectableLayer* constLayer = delegateData.m_Network->AddConstantLayer(constAlphaTensor,
+ alphaName.c_str());
ARMNN_ASSERT(constLayer != nullptr);
constLayer->GetOutputSlot(0).SetTensorInfo(alphaTensorInfo);