aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/armnnTfLiteParser/TfLiteParser.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/armnnTfLiteParser/TfLiteParser.cpp b/src/armnnTfLiteParser/TfLiteParser.cpp
index 33567953a2..880de100c1 100644
--- a/src/armnnTfLiteParser/TfLiteParser.cpp
+++ b/src/armnnTfLiteParser/TfLiteParser.cpp
@@ -948,16 +948,19 @@ void TfLiteParserImpl::RegisterProducerOfTensor(size_t subgraphIndex,
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;
}