diff options
author | Mike Kelly <mike.kelly@arm.com> | 2023-08-02 13:23:09 +0100 |
---|---|---|
committer | Nikhil Raj Arm <nikhil.raj@arm.com> | 2023-08-03 20:29:40 +0000 |
commit | 07169c8cc8b73ba5f3550cb0e8688de73d438c7e (patch) | |
tree | 5c9447a52ac676268756a3421a0a8e933321e60a /delegate/classic/src/Prelu.hpp | |
parent | b179382bcb4944d0137aa9799c3c56a2102ecda2 (diff) | |
download | armnn-07169c8cc8b73ba5f3550cb0e8688de73d438c7e.tar.gz |
MLCE-1092 Added layerNames to classic delegate
* All layers added through the classic delegate will have a name that
includes the nodeIndex from the tflite model.
* Added utilities to ClassicDelegateUtils to get the names for the layers.
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: Iac567486d1f91c0a99b77ed8963f6b6ca26b0b59
Diffstat (limited to 'delegate/classic/src/Prelu.hpp')
-rw-r--r-- | delegate/classic/src/Prelu.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/delegate/classic/src/Prelu.hpp b/delegate/classic/src/Prelu.hpp index 4fdad4a6b7..193e3f0376 100644 --- a/delegate/classic/src/Prelu.hpp +++ b/delegate/classic/src/Prelu.hpp @@ -81,7 +81,8 @@ TfLiteStatus VisitPreluOperator(DelegateData& delegateData, outputTensorInfo); } - armnn::IConnectableLayer* preluLayer = delegateData.m_Network->AddPreluLayer(); + auto layerName = GetLayerName(armnn::LayerType::Prelu, nodeIndex); + armnn::IConnectableLayer* preluLayer = delegateData.m_Network->AddPreluLayer(layerName.c_str()); ARMNN_ASSERT(preluLayer != nullptr); bool isConstantAlpha = tflite::IsConstantTensor(&tfLiteAlphaTensor); @@ -91,7 +92,9 @@ TfLiteStatus VisitPreluOperator(DelegateData& delegateData, { auto constAlphaTensor = armnn::ConstTensor(alphaTensorInfo, tfLiteAlphaTensor.data.data); - armnn::IConnectableLayer* constLayer = delegateData.m_Network->AddConstantLayer(constAlphaTensor); + auto alphaName = GetLayerName(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); |