aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColm Donelan <Colm.Donelan@arm.com>2021-04-07 17:28:01 +0100
committerColm Donelan <colm.donelan@arm.com>2021-04-07 19:58:31 +0000
commit30aa3713a21888dcbc640182a2fcf2d161348d62 (patch)
tree9b01cb2c9cdccf58aa1302fb61497991b398679a /src
parent4422ceca976a88aac49b21808a43e465bc87a35e (diff)
downloadarmnn-30aa3713a21888dcbc640182a2fcf2d161348d62.tar.gz
IVGCVSW-5768 Output layer bindings are ignoring outputSlotIndex.
In the bug there were 4 outputs from the final layer. The de-serialized layer bindings were incorrectly assigning the tensor info of one output to all 4 outputs. The solution is to use outputSlotIndex. One other minor fix: The debug text referred to an Input when dealing with an output. Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: I6c68b781a450ae4a5cf1d0e8671bb96ff01862b2
Diffstat (limited to 'src')
-rw-r--r--src/armnnDeserializer/Deserializer.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/armnnDeserializer/Deserializer.cpp b/src/armnnDeserializer/Deserializer.cpp
index 633c272f00..9f68e71175 100644
--- a/src/armnnDeserializer/Deserializer.cpp
+++ b/src/armnnDeserializer/Deserializer.cpp
@@ -990,18 +990,19 @@ void IDeserializer::DeserializerImpl::SetupOutputLayers(GraphPtr graph)
// GetBindingLayerInfo expect the index to be index in the vector not index property on each layer base
LayerBindingId bindingId = GetBindingLayerInfo(graph, outputLayerIndex);
- ARMNN_ASSERT_MSG(baseLayer->layerName()->c_str(), "Input has no name.");
+ ARMNN_ASSERT_MSG(baseLayer->layerName()->c_str(), "Output has no name.");
IConnectableLayer* outputLayer =
m_Network->AddOutputLayer(bindingId, baseLayer->layerName()->c_str());
RegisterInputSlots(graph, outputLayerIndex, outputLayer);
-
unsigned int sourceLayerIndex =
GetLayerIndexInVector(graph, baseLayer->inputSlots()->Get(0)->connection()->sourceLayerIndex());
+ unsigned int outputSlotIndex =
+ GetLayerIndexInVector(graph, baseLayer->inputSlots()->Get(0)->connection()->outputSlotIndex());
LayerBaseRawPtr sourceBaseLayer = GetBaseLayer(graph, sourceLayerIndex);
- const armnn::TensorInfo& tensorInfo = ToTensorInfo(sourceBaseLayer->outputSlots()->Get(0)->tensorInfo());
-
+ const armnn::TensorInfo& tensorInfo = ToTensorInfo(
+ sourceBaseLayer->outputSlots()->Get(outputSlotIndex)->tensorInfo());
BindingPointInfo bindingInfo = {bindingId, tensorInfo};
m_OutputBindings.push_back(std::make_pair(baseLayer->layerName()->c_str(), bindingInfo));
}