aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Virginas-Tar <Aron.Virginas-Tar@arm.com>2019-02-25 14:12:46 +0000
committerAron Virginas-Tar <aron.virginas-tar@arm.com>2019-02-25 14:58:32 +0000
commita1ecc49d1beb8d2cbb76c259b73b0f5a537aab2e (patch)
treefec863f816bd9155fc845db45af7b41190fbf888
parent451d95bff7d8cd2d759fbb1b31bbeddd9c332360 (diff)
downloadarmnn-a1ecc49d1beb8d2cbb76c259b73b0f5a537aab2e.tar.gz
IVGCVSW-2762 Fix missing layer name and output slot index in DebugLayer output
Change-Id: Idda9c8ba244c74d931105ced90c38a12d48df48a Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
-rw-r--r--src/armnn/NetworkUtils.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/armnn/NetworkUtils.cpp b/src/armnn/NetworkUtils.cpp
index d0c36dd34f..a7f89ff222 100644
--- a/src/armnn/NetworkUtils.cpp
+++ b/src/armnn/NetworkUtils.cpp
@@ -85,17 +85,16 @@ std::vector<DebugLayer*> InsertDebugLayerAfter(Graph& graph, Layer& layer)
std::vector<DebugLayer*> debugLayers;
debugLayers.reserve(layer.GetNumOutputSlots());
- // Change outputs to DataType::Float16
+ // Connect a DebugLayer to each output slot of the layer
+ unsigned int outputSlotIndex = 0u;
for (auto&& outputSlot = layer.BeginOutputSlots(); outputSlot != layer.EndOutputSlots(); ++outputSlot)
{
- // Insert debug layer after the layer
- const std::string name =
- std::string("DebugLayerAfter") + layer.GetName();
-
- const DebugDescriptor descriptor;
+ const std::string layerName(layer.GetName());
+ const std::string debugName = std::string("DebugLayerAfter") + layerName;
+ const DebugDescriptor descriptor(layerName, outputSlotIndex++);
DebugLayer* debugLayer =
- graph.InsertNewLayer<DebugLayer>(*outputSlot, descriptor, name.c_str());
+ graph.InsertNewLayer<DebugLayer>(*outputSlot, descriptor, debugName.c_str());
// Sets output tensor info for the debug layer.
TensorInfo debugInfo = debugLayer->GetInputSlot(0).GetConnectedOutputSlot()->GetTensorInfo();