ArmNN
 24.08
IOnnxParser Class Reference

#include <IOnnxParser.hpp>

Public Member Functions

armnn::INetworkPtr CreateNetworkFromBinary (const std::vector< uint8_t > &binaryContent)
 Create the network from a protobuf binary vector. More...
 
armnn::INetworkPtr CreateNetworkFromBinary (const std::vector< uint8_t > &binaryContent, const std::map< std::string, armnn::TensorShape > &inputShapes)
 Create the network from a protobuf binary vector, with inputShapes specified. More...
 
armnn::INetworkPtr CreateNetworkFromBinaryFile (const char *graphFile)
 Create the network from a protobuf binary file on disk. More...
 
armnn::INetworkPtr CreateNetworkFromTextFile (const char *graphFile)
 Create the network from a protobuf text file on disk. More...
 
armnn::INetworkPtr CreateNetworkFromString (const std::string &protoText)
 Create the network directly from protobuf text in a string. Useful for debugging/testing. More...
 
armnn::INetworkPtr CreateNetworkFromBinaryFile (const char *graphFile, const std::map< std::string, armnn::TensorShape > &inputShapes)
 Create the network from a protobuf binary file on disk, with inputShapes specified. More...
 
armnn::INetworkPtr CreateNetworkFromTextFile (const char *graphFile, const std::map< std::string, armnn::TensorShape > &inputShapes)
 Create the network from a protobuf text file on disk, with inputShapes specified. More...
 
armnn::INetworkPtr CreateNetworkFromString (const std::string &protoText, const std::map< std::string, armnn::TensorShape > &inputShapes)
 Create the network directly from protobuf text in a string, with inputShapes specified. More...
 
BindingPointInfo GetNetworkInputBindingInfo (const std::string &name) const
 Retrieve binding info (layer id and tensor info) for the network input identified by the given layer name. More...
 
BindingPointInfo GetNetworkOutputBindingInfo (const std::string &name) const
 Retrieve binding info (layer id and tensor info) for the network output identified by the given layer name. More...
 

Static Public Member Functions

static IOnnxParserCreateRaw ()
 
static IOnnxParserPtr Create ()
 
static void Destroy (IOnnxParser *parser)
 

Detailed Description

Definition at line 23 of file IOnnxParser.hpp.

Member Function Documentation

◆ Create()

◆ CreateNetworkFromBinary() [1/2]

armnn::INetworkPtr CreateNetworkFromBinary ( const std::vector< uint8_t > &  binaryContent)

Create the network from a protobuf binary vector.

Definition at line 55 of file OnnxParser.cpp.

56 {
57  return pOnnxParserImpl->CreateNetworkFromBinary(binaryContent);
58 }

◆ CreateNetworkFromBinary() [2/2]

armnn::INetworkPtr CreateNetworkFromBinary ( const std::vector< uint8_t > &  binaryContent,
const std::map< std::string, armnn::TensorShape > &  inputShapes 
)

Create the network from a protobuf binary vector, with inputShapes specified.

Definition at line 60 of file OnnxParser.cpp.

62 {
63  return pOnnxParserImpl->CreateNetworkFromBinary(binaryContent, inputShapes);
64 }

◆ CreateNetworkFromBinaryFile() [1/2]

armnn::INetworkPtr CreateNetworkFromBinaryFile ( const char *  graphFile)

Create the network from a protobuf binary file on disk.

Definition at line 50 of file OnnxParser.cpp.

51 {
52  return pOnnxParserImpl->CreateNetworkFromBinaryFile(graphFile);
53 }

References IOnnxParser::CreateNetworkFromBinaryFile().

Referenced by IOnnxParser::CreateNetworkFromBinaryFile().

◆ CreateNetworkFromBinaryFile() [2/2]

armnn::INetworkPtr CreateNetworkFromBinaryFile ( const char *  graphFile,
const std::map< std::string, armnn::TensorShape > &  inputShapes 
)

Create the network from a protobuf binary file on disk, with inputShapes specified.

Definition at line 76 of file OnnxParser.cpp.

79 {
80  return pOnnxParserImpl->CreateNetworkFromBinaryFile(graphFile, inputShapes);
81 }

◆ CreateNetworkFromString() [1/2]

armnn::INetworkPtr CreateNetworkFromString ( const std::string &  protoText)

Create the network directly from protobuf text in a string. Useful for debugging/testing.

Definition at line 71 of file OnnxParser.cpp.

72 {
73  return pOnnxParserImpl->CreateNetworkFromString(protoText);
74 }

◆ CreateNetworkFromString() [2/2]

armnn::INetworkPtr CreateNetworkFromString ( const std::string &  protoText,
const std::map< std::string, armnn::TensorShape > &  inputShapes 
)

Create the network directly from protobuf text in a string, with inputShapes specified.

Useful for debugging/testing

Definition at line 89 of file OnnxParser.cpp.

91 {
92  return pOnnxParserImpl->CreateNetworkFromString(protoText, inputShapes);
93 }

◆ CreateNetworkFromTextFile() [1/2]

armnn::INetworkPtr CreateNetworkFromTextFile ( const char *  graphFile)

Create the network from a protobuf text file on disk.

Definition at line 66 of file OnnxParser.cpp.

67 {
68  return pOnnxParserImpl->CreateNetworkFromTextFile(graphFile);
69 }

◆ CreateNetworkFromTextFile() [2/2]

armnn::INetworkPtr CreateNetworkFromTextFile ( const char *  graphFile,
const std::map< std::string, armnn::TensorShape > &  inputShapes 
)

Create the network from a protobuf text file on disk, with inputShapes specified.

Definition at line 83 of file OnnxParser.cpp.

85 {
86  return pOnnxParserImpl->CreateNetworkFromTextFile(graphFile, inputShapes);
87 }

◆ CreateRaw()

IOnnxParser * CreateRaw ( )
static

Definition at line 33 of file OnnxParser.cpp.

34 {
35  return new IOnnxParser();
36 }

◆ Destroy()

void Destroy ( IOnnxParser parser)
static

Definition at line 45 of file OnnxParser.cpp.

46 {
47  delete parser;
48 }

◆ GetNetworkInputBindingInfo()

BindingPointInfo GetNetworkInputBindingInfo ( const std::string &  name) const

Retrieve binding info (layer id and tensor info) for the network input identified by the given layer name.

Definition at line 95 of file OnnxParser.cpp.

96 {
97  return pOnnxParserImpl->GetNetworkInputBindingInfo(name);
98 }

◆ GetNetworkOutputBindingInfo()

BindingPointInfo GetNetworkOutputBindingInfo ( const std::string &  name) const

Retrieve binding info (layer id and tensor info) for the network output identified by the given layer name.

Definition at line 100 of file OnnxParser.cpp.

101 {
102  return pOnnxParserImpl->GetNetworkOutputBindingInfo(name);
103 }

The documentation for this class was generated from the following files:
ARMNN_NO_DEPRECATE_WARN_BEGIN
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
armnnOnnxParser::IOnnxParser::CreateRaw
static IOnnxParser * CreateRaw()
Definition: OnnxParser.cpp:33
ARMNN_NO_DEPRECATE_WARN_END
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34
armnnOnnxParser::IOnnxParserPtr
std::unique_ptr< IOnnxParser, void(*)(IOnnxParser *parser)> IOnnxParserPtr
Definition: IOnnxParser.hpp:21
armnnOnnxParser::IOnnxParser::Destroy
static void Destroy(IOnnxParser *parser)
Definition: OnnxParser.cpp:45