ArmNN
 25.11
Loading...
Searching...
No Matches
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.
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.
armnn::INetworkPtr CreateNetworkFromBinaryFile (const char *graphFile)
 Create the network from a protobuf binary file on disk.
armnn::INetworkPtr CreateNetworkFromTextFile (const char *graphFile)
 Create the network from a protobuf text file on disk.
armnn::INetworkPtr CreateNetworkFromString (const std::string &protoText)
 Create the network directly from protobuf text in a string. Useful for debugging/testing.
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.
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.
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.
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.
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.

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()

IOnnxParserPtr Create ( )
static

Definition at line 38 of file OnnxParser.cpp.

39{
41 return IOnnxParserPtr(CreateRaw(), &IOnnxParser::Destroy);
43}
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
#define ARMNN_NO_DEPRECATE_WARN_END
std::unique_ptr< IOnnxParser, void(*)(IOnnxParser *parser)> IOnnxParserPtr

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, Create(), CreateRaw(), and Destroy().

Referenced by 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}

References CreateNetworkFromBinary().

Referenced by CreateNetworkFromBinary(), and CreateNetworkFromBinary().

◆ 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}

References CreateNetworkFromBinary().

◆ 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 CreateNetworkFromBinaryFile().

Referenced by CreateNetworkFromBinaryFile(), and 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}

References CreateNetworkFromBinaryFile().

◆ 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}

References CreateNetworkFromString().

Referenced by CreateNetworkFromString(), and CreateNetworkFromString().

◆ 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}

References CreateNetworkFromString().

◆ 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}

References CreateNetworkFromTextFile().

Referenced by CreateNetworkFromTextFile(), and CreateNetworkFromTextFile().

◆ 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}

References CreateNetworkFromTextFile().

◆ CreateRaw()

IOnnxParser * CreateRaw ( )
static

Definition at line 33 of file OnnxParser.cpp.

34{
35 return new IOnnxParser();
36}

References CreateRaw().

Referenced by Create(), and CreateRaw().

◆ Destroy()

void Destroy ( IOnnxParser * parser)
static

Definition at line 45 of file OnnxParser.cpp.

46{
47 delete parser;
48}

References Destroy().

Referenced by Create(), and Destroy().

◆ 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}

References GetNetworkInputBindingInfo().

Referenced by GetNetworkInputBindingInfo().

◆ 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}

References GetNetworkOutputBindingInfo().

Referenced by GetNetworkOutputBindingInfo().


The documentation for this class was generated from the following files: