From a1ecc49d1beb8d2cbb76c259b73b0f5a537aab2e Mon Sep 17 00:00:00 2001 From: Aron Virginas-Tar Date: Mon, 25 Feb 2019 14:12:46 +0000 Subject: IVGCVSW-2762 Fix missing layer name and output slot index in DebugLayer output Change-Id: Idda9c8ba244c74d931105ced90c38a12d48df48a Signed-off-by: Aron Virginas-Tar --- src/armnn/NetworkUtils.cpp | 13 ++++++------- 1 file 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 InsertDebugLayerAfter(Graph& graph, Layer& layer) std::vector 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(*outputSlot, descriptor, name.c_str()); + graph.InsertNewLayer(*outputSlot, descriptor, debugName.c_str()); // Sets output tensor info for the debug layer. TensorInfo debugInfo = debugLayer->GetInputSlot(0).GetConnectedOutputSlot()->GetTensorInfo(); -- cgit v1.2.1