diff options
author | Andre Ghattas <andre.ghattas@arm.com> | 2019-08-07 12:18:38 +0100 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-09-04 09:41:41 +0000 |
commit | 23ae2eae1caefba4948e6afda154a66238b26c2a (patch) | |
tree | 084b6e7b45add57a363826d1088c7821fe93e9e9 /src/armnn/layers/DepthwiseConvolution2dLayer.cpp | |
parent | 9bb51d7c3668f6b2715735f286ffd89b727d6805 (diff) | |
download | armnn-23ae2eae1caefba4948e6afda154a66238b26c2a.tar.gz |
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 <andre.ghattas@arm.com>
Signed-off-by: Szilard Papp <szilard.papp@arm.com>
Diffstat (limited to 'src/armnn/layers/DepthwiseConvolution2dLayer.cpp')
-rw-r--r-- | src/armnn/layers/DepthwiseConvolution2dLayer.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
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 <backendsCommon/CpuTensorHandle.hpp> #include <backendsCommon/WorkloadFactory.hpp> - +#include <string> #include <DataLayoutIndexed.hpp> using namespace armnnUtils; @@ -24,6 +24,28 @@ DepthwiseConvolution2dLayer::DepthwiseConvolution2dLayer(const DepthwiseConvolut { } +void DepthwiseConvolution2dLayer::SerializeLayerParameters(ParameterStringifyFunction& fn) const +{ + const std::vector<TensorShape>& 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<DepthwiseConvolution2dDescriptor>::SerializeLayerParameters(fn); +} + std::unique_ptr<IWorkload> DepthwiseConvolution2dLayer::CreateWorkload(const Graph& graph, const IWorkloadFactory& factory) const { |