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

IOnnxParserPtr Create ( )
static

Definition at line 38 of file OnnxParser.cpp.

39 {
41 }

References IDeserializer::CreateRaw().

◆ CreateNetworkFromBinary() [1/2]

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

Create the network from a protobuf binary vector.

Definition at line 53 of file OnnxParser.cpp.

54 {
55  return pOnnxParserImpl->CreateNetworkFromBinary(binaryContent);
56 }

◆ 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 58 of file OnnxParser.cpp.

60 {
61  return pOnnxParserImpl->CreateNetworkFromBinary(binaryContent, inputShapes);
62 }

◆ CreateNetworkFromBinaryFile() [1/2]

armnn::INetworkPtr CreateNetworkFromBinaryFile ( const char *  graphFile)

Create the network from a protobuf binary file on disk.

Definition at line 48 of file OnnxParser.cpp.

49 {
50  return pOnnxParserImpl->CreateNetworkFromBinaryFile(graphFile);
51 }

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 74 of file OnnxParser.cpp.

77 {
78  return pOnnxParserImpl->CreateNetworkFromBinaryFile(graphFile, inputShapes);
79 }

◆ 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 69 of file OnnxParser.cpp.

70 {
71  return pOnnxParserImpl->CreateNetworkFromString(protoText);
72 }

◆ 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 87 of file OnnxParser.cpp.

89 {
90  return pOnnxParserImpl->CreateNetworkFromString(protoText, inputShapes);
91 }

◆ CreateNetworkFromTextFile() [1/2]

armnn::INetworkPtr CreateNetworkFromTextFile ( const char *  graphFile)

Create the network from a protobuf text file on disk.

Definition at line 64 of file OnnxParser.cpp.

65 {
66  return pOnnxParserImpl->CreateNetworkFromTextFile(graphFile);
67 }

◆ 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 81 of file OnnxParser.cpp.

83 {
84  return pOnnxParserImpl->CreateNetworkFromTextFile(graphFile, inputShapes);
85 }

◆ 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 43 of file OnnxParser.cpp.

44 {
45  delete parser;
46 }

◆ 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 93 of file OnnxParser.cpp.

94 {
95  return pOnnxParserImpl->GetNetworkInputBindingInfo(name);
96 }

◆ 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 98 of file OnnxParser.cpp.

99 {
100  return pOnnxParserImpl->GetNetworkOutputBindingInfo(name);
101 }

The documentation for this class was generated from the following files:
armnnOnnxParser::IOnnxParser::CreateRaw
static IOnnxParser * CreateRaw()
Definition: OnnxParser.cpp:33
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:43