IVGCVSW-7103 ExecuteNetwork failed while doing Yolov4 execution
* Adding the check only if it's not a const layer which is needed to run ai_benchmark_v5_yolo_v4_tiny_quant.tflite model
* We still won't be able to run the model due to IVGCVSW-7158
Signed-off-by: Nikhil Raj <nikraj01@e126673.cambridge.arm.com>
Change-Id: Ib7e77a0b5a64be0c92a8e4eae45729f799770b37
diff --git a/src/armnnTfLiteParser/TfLiteParser.cpp b/src/armnnTfLiteParser/TfLiteParser.cpp
index 3356795..880de10 100644
--- a/src/armnnTfLiteParser/TfLiteParser.cpp
+++ b/src/armnnTfLiteParser/TfLiteParser.cpp
@@ -948,16 +948,19 @@
TensorSlots & tensorSlots = m_SubgraphConnections[subgraphIndex][tensorIndex];
- // assuming there is only one producer for that tensor
- if (tensorSlots.outputSlot != nullptr)
+ if (slot->GetOwningIConnectableLayer().GetType() != LayerType::Constant)
{
- throw ParseException(fmt::format("Another layer has already registered itself as the producer of "
- "subgraph:{} tensor:{} {}",
- subgraphIndex,
- tensorIndex,
- CHECK_LOCATION().AsString()));
- }
+ // assuming there is only one producer for that tensor
+ if (tensorSlots.outputSlot != nullptr)
+ {
+ throw ParseException(fmt::format("Another layer has already registered itself as the producer of "
+ "subgraph:{} tensor:{} {}",
+ subgraphIndex,
+ tensorIndex,
+ CHECK_LOCATION().AsString()));
+ }
+ }
tensorSlots.outputSlot = slot;
}