aboutsummaryrefslogtreecommitdiff
path: root/delegate/classic/src/Shape.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'delegate/classic/src/Shape.hpp')
-rw-r--r--delegate/classic/src/Shape.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/delegate/classic/src/Shape.hpp b/delegate/classic/src/Shape.hpp
index e5dae23238..10800b843b 100644
--- a/delegate/classic/src/Shape.hpp
+++ b/delegate/classic/src/Shape.hpp
@@ -42,7 +42,7 @@ TfLiteStatus VisitShapeOperator(DelegateData& delegateData,
const armnn::TensorInfo& outputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteOutputTensor, true);
auto* shapeParameters = reinterpret_cast<TfLiteShapeParams*>(tfLiteNode->builtin_data);
- if ( shapeParameters->out_type != kTfLiteInt32 && shapeParameters->out_type != kTfLiteInt64 )
+ if (shapeParameters->out_type != kTfLiteInt32 && shapeParameters->out_type != kTfLiteInt64)
{
TF_LITE_MAYBE_KERNEL_LOG(
tfLiteContext,
@@ -75,7 +75,8 @@ TfLiteStatus VisitShapeOperator(DelegateData& delegateData,
}
// Add a Shape layer
- armnn::IConnectableLayer* layer = delegateData.m_Network->AddShapeLayer();
+ auto layerName = GetLayerName(armnn::LayerType::Shape, nodeIndex);
+ armnn::IConnectableLayer* layer = delegateData.m_Network->AddShapeLayer(layerName.c_str());
layer->SetBackendId(setBackend);
ARMNN_ASSERT(layer != nullptr);
@@ -83,7 +84,7 @@ TfLiteStatus VisitShapeOperator(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;
}