From 6f37f83a27160948fee366b9f195c52f78cb88f0 Mon Sep 17 00:00:00 2001 From: narpra01 Date: Fri, 21 Dec 2018 18:30:00 +0000 Subject: IVGCVSW-2353 Ignore control inputs in TensorFlow parser * Allow control inputs from TensorFlow graph but ignore them in ArmNN graph. * Add utility function to test ArmNN graph structure. * Add ArmNN graph structure tests in TensorFlow paresr to ensure that control inputs are ignored in ArmNN graph as well as their inputs that are not used anywhere else. Change-Id: Ib0ea0d2df85e3fc79b748fa4c9d20e0649352bc1 --- src/armnn/test/GraphUtils.hpp | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'src/armnn/test/GraphUtils.hpp') diff --git a/src/armnn/test/GraphUtils.hpp b/src/armnn/test/GraphUtils.hpp index 04f9727dc0..b51e4d179e 100644 --- a/src/armnn/test/GraphUtils.hpp +++ b/src/armnn/test/GraphUtils.hpp @@ -8,18 +8,16 @@ #include -namespace -{ - -bool GraphHasNamedLayer(const armnn::Graph& graph, const std::string& name) -{ - for (auto&& layer : graph) - { - if (layer->GetName() == name) - { - return true; - } - } - return false; -} -} \ No newline at end of file + +bool GraphHasNamedLayer(const armnn::Graph& graph, const std::string& name); + +armnn::Layer* GetFirstLayerWithName(armnn::Graph& graph, const std::string& name); + +bool CheckNumberOfInputSlot(armnn::Layer* layer, unsigned int num); + +bool CheckNumberOfOutputSlot(armnn::Layer* layer, unsigned int num); + +bool IsConnected(armnn::Layer* srcLayer, armnn::Layer* destLayer, + unsigned int srcSlot, unsigned int destSlot, + const armnn::TensorInfo& expectedTensorInfo); + -- cgit v1.2.1