From 337c17f964fd4d40fe638ef960f7f96b61b63947 Mon Sep 17 00:00:00 2001 From: Ryan OShea Date: Fri, 21 Feb 2020 12:33:17 +0000 Subject: IVGCVSW-4307 Onnx Segfault Bug * Fixed ParseConstant * Fixed Exception * Fixed 0 dimension tensor * Add unit test to check addition as tensor and scalar * Change C++ style comments to Doxygen style Signed-off-by: Ryan OShea Change-Id: Ied7cbe2e11e713c23d87106d2db39e0eb446c920 --- src/armnnOnnxParser/OnnxParser.hpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/armnnOnnxParser/OnnxParser.hpp') diff --git a/src/armnnOnnxParser/OnnxParser.hpp b/src/armnnOnnxParser/OnnxParser.hpp index a467180299..f9fa6d969f 100644 --- a/src/armnnOnnxParser/OnnxParser.hpp +++ b/src/armnnOnnxParser/OnnxParser.hpp @@ -54,10 +54,10 @@ public: static ModelPtr LoadModelFromTextFile(const char * fileName); static ModelPtr LoadModelFromString(const std::string& inputString); - ///Retrieve inputs names + /// Retrieve inputs names static std::vector GetInputs(ModelPtr& model); - ///Retrieve outputs names + /// Retrieve outputs names static std::vector GetOutputs(ModelPtr& model); private: @@ -65,7 +65,7 @@ private: /// Parses a ModelProto loaded into memory from one of the other CreateNetwork* armnn::INetworkPtr CreateNetworkFromModel(onnx::ModelProto& model); - ///Parse every node and make the connection between the resulting tensors + /// Parse every node and make the connection between the resulting tensors void LoadGraph(); void SetupInfo(const google::protobuf::RepeatedPtrField* list); @@ -136,10 +136,10 @@ private: /// The network we're building. Gets cleared after it is passed to the user armnn::INetworkPtr m_Network; - ///Ptr to the graph we're building the network from + /// Ptr to the graph we're building the network from GraphPtr m_Graph; - ///Map of the information for every tensor + /// Map of the information for every tensor struct OnnxTensor { std::unique_ptr m_info; @@ -148,7 +148,6 @@ private: OnnxTensor() : m_info(nullptr), m_tensor(nullptr), m_dtype(onnx::TensorProto::FLOAT) { } bool isConstant() { return m_tensor != nullptr; } - }; std::unordered_map m_TensorsInfo; @@ -166,10 +165,10 @@ private: TensorSlots() : outputSlot(nullptr) { } }; - ///Map of the tensor names to their connections for the connections of the layers of the graph + /// Map of the tensor names to their connections for the connections of the layers of the graph std::unordered_map m_TensorConnections; - //Map of the tensor names to their node and index in graph.node() + /// Map of the tensor names to their node and index in graph.node() std::unordered_map> m_OutputsMap; /// Number of times a specific node (identified by his index number) was used as input -- cgit v1.2.1