diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2021-10-13 11:44:50 +0100 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2021-10-18 08:32:02 +0000 |
commit | 1b11f32dbfea8383956c5d2c60b034469194f6d9 (patch) | |
tree | 3bd3f73e9af499778db894c3db18dc7b5f4ee668 /src/armnnOnnxParser/OnnxParser.hpp | |
parent | ea0712e72080b794fa864e67d073d3bfe2eda0f1 (diff) | |
download | armnn-1b11f32dbfea8383956c5d2c60b034469194f6d9.tar.gz |
IVGCVSW-6450 Add Support of Models with Dynamic Batch Tensor to ONNX parser
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: Ia7dbf0735619d406d6b4e34a71f14f20d92586e6
Diffstat (limited to 'src/armnnOnnxParser/OnnxParser.hpp')
-rw-r--r-- | src/armnnOnnxParser/OnnxParser.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/armnnOnnxParser/OnnxParser.hpp b/src/armnnOnnxParser/OnnxParser.hpp index ec19006be7..a0fa8af31b 100644 --- a/src/armnnOnnxParser/OnnxParser.hpp +++ b/src/armnnOnnxParser/OnnxParser.hpp @@ -34,12 +34,25 @@ public: /// Create the network from a protobuf binary file on disk armnn::INetworkPtr CreateNetworkFromBinaryFile(const char* graphFile); + /// Create the network from a protobuf binary file on disk, with inputShapes specified + armnn::INetworkPtr CreateNetworkFromBinaryFile(const char* graphFile, + const std::map<std::string, armnn::TensorShape>& inputShapes); + /// Create the network from a protobuf text file on disk armnn::INetworkPtr CreateNetworkFromTextFile(const char* graphFile); + /// Create the network from a protobuf text file on disk, with inputShapes specified + armnn::INetworkPtr CreateNetworkFromTextFile(const char* graphFile, + const std::map<std::string, armnn::TensorShape>& inputShapes); + /// Create the network directly from protobuf text in a string. Useful for debugging/testing armnn::INetworkPtr CreateNetworkFromString(const std::string& protoText); + /// Create the network directly from protobuf text in a string, with inputShapes specified. + /// Useful for debugging/testing + armnn::INetworkPtr CreateNetworkFromString(const std::string& protoText, + const std::map<std::string, armnn::TensorShape>& inputShapes); + /// Retrieve binding info (layer id and tensor info) for the network input identified by the given layer name BindingPointInfo GetNetworkInputBindingInfo(const std::string& name) const; @@ -203,5 +216,11 @@ private: std::vector<UsageSummary> m_OutputsFusedAndUsed; + std::map<std::string, armnn::TensorShape> m_InputShapes; + + std::unordered_map<std::string, armnn::TensorInfo> m_InputInfos; + + std::unordered_map<std::string, armnn::TensorInfo> m_OutputInfos; + }; } |