From 23ae2eae1caefba4948e6afda154a66238b26c2a Mon Sep 17 00:00:00 2001 From: Andre Ghattas Date: Wed, 7 Aug 2019 12:18:38 +0100 Subject: IVGCVBENCH-1337 Added additional layer parameters to dot file and -v option * Generic layer parameters now show up in dot file * Convolution layer parameters have also been added to dot file * ExecucteNetwork has an additional -v flag which generated dot file if there Change-Id: I210bb19b45384eb3639b7e488c7a89049fa6f18d Signed-off-by: Andre Ghattas Signed-off-by: Szilard Papp --- src/armnn/layers/DepthwiseConvolution2dLayer.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'src/armnn/layers/DepthwiseConvolution2dLayer.cpp') diff --git a/src/armnn/layers/DepthwiseConvolution2dLayer.cpp b/src/armnn/layers/DepthwiseConvolution2dLayer.cpp index e49c179eb1..a50a0f6310 100644 --- a/src/armnn/layers/DepthwiseConvolution2dLayer.cpp +++ b/src/armnn/layers/DepthwiseConvolution2dLayer.cpp @@ -10,7 +10,7 @@ #include #include - +#include #include using namespace armnnUtils; @@ -24,6 +24,28 @@ DepthwiseConvolution2dLayer::DepthwiseConvolution2dLayer(const DepthwiseConvolut { } +void DepthwiseConvolution2dLayer::SerializeLayerParameters(ParameterStringifyFunction& fn) const +{ + const std::vector& inputShapes = + { + GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(), + m_Weight->GetTensorInfo().GetShape() + }; + const TensorShape filterShape = inputShapes[1]; + DataLayoutIndexed dataLayoutIndex(m_Param.m_DataLayout); + unsigned int inputChannels = filterShape[1]; + unsigned int filterWidth = filterShape[3]; + unsigned int filterHeight = filterShape[2]; + unsigned int depthMultiplier = filterShape[0]; + + fn("FilterWidth",std::to_string(filterWidth)); + fn("FilterHeight",std::to_string(filterHeight)); + fn("DepthMultiplier",std::to_string(depthMultiplier)); + fn("InputChannels",std::to_string(inputChannels)); + + LayerWithParameters::SerializeLayerParameters(fn); +} + std::unique_ptr DepthwiseConvolution2dLayer::CreateWorkload(const Graph& graph, const IWorkloadFactory& factory) const { -- cgit v1.2.1