ArmNN
 22.08
IOnnxParser Class Reference

#include <IOnnxParser.hpp>

Public Member Functions

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.

Referenced by ArmNNExecutor::CompareAndPrintResult(), and TEST_SUITE().

39 {
41 }
static IOnnxParser * CreateRaw()
Definition: OnnxParser.cpp:33
static void Destroy(IOnnxParser *parser)
Definition: OnnxParser.cpp:43
std::unique_ptr< IOnnxParser, void(*)(IOnnxParser *parser)> IOnnxParserPtr
Definition: IOnnxParser.hpp:21

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

References IOnnxParser::CreateNetworkFromBinaryFile().

Referenced by IOnnxParser::CreateNetworkFromBinaryFile().

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

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

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

59 {
60  return pOnnxParserImpl->CreateNetworkFromString(protoText);
61 }

◆ 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

◆ CreateNetworkFromTextFile() [1/2]

armnn::INetworkPtr CreateNetworkFromTextFile ( const char *  graphFile)

Create the network from a protobuf text file on disk.

Definition at line 53 of file OnnxParser.cpp.

54 {
55  return pOnnxParserImpl->CreateNetworkFromTextFile(graphFile);
56 }

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

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

83 {
84  return pOnnxParserImpl->GetNetworkInputBindingInfo(name);
85 }

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

References CheckLocation::AsString().

88 {
89  return pOnnxParserImpl->GetNetworkOutputBindingInfo(name);
90 }

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