ArmNN
 21.02
ICaffeParser Class Reference

#include <ICaffeParser.hpp>

Classes

class  CaffeParserImpl
 

Public Member Functions

armnn::INetworkPtr CreateNetworkFromTextFile (const char *graphFile, const std::map< std::string, armnn::TensorShape > &inputShapes, const std::vector< std::string > &requestedOutputs)
 Create the network from a protobuf text file on the disk. More...
 
armnn::INetworkPtr CreateNetworkFromBinaryFile (const char *graphFile, const std::map< std::string, armnn::TensorShape > &inputShapes, const std::vector< std::string > &requestedOutputs)
 Create the network from a protobuf binary file on the disk. More...
 
armnn::INetworkPtr CreateNetworkFromString (const char *protoText, const std::map< std::string, armnn::TensorShape > &inputShapes, const std::vector< std::string > &requestedOutputs)
 Create the network directly from protobuf text in a string. Useful for debugging/testin.g. 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 ICaffeParserCreateRaw ()
 
static ICaffeParserPtr Create ()
 
static void Destroy (ICaffeParser *parser)
 

Friends

class CaffeParser
 
class RecordByRecordCaffeParser
 

Detailed Description

Definition at line 24 of file ICaffeParser.hpp.

Member Function Documentation

◆ Create()

ICaffeParserPtr Create ( )
static

Definition at line 75 of file CaffeParser.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and main().

76 {
78 }
static void Destroy(ICaffeParser *parser)
Definition: CaffeParser.cpp:80
std::unique_ptr< ICaffeParser, void(*)(ICaffeParser *parser)> ICaffeParserPtr
static ICaffeParser * CreateRaw()
Definition: CaffeParser.cpp:70

◆ CreateNetworkFromBinaryFile()

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

Create the network from a protobuf binary file on the disk.

Definition at line 93 of file CaffeParser.cpp.

97 {
98  return pCaffeParserImpl->CreateNetworkFromBinaryFile(graphFile, inputShapes,requestedOutputs);
99 }

◆ CreateNetworkFromString()

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

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

Definition at line 101 of file CaffeParser.cpp.

105 {
106  return pCaffeParserImpl->CreateNetworkFromString(protoText, inputShapes, requestedOutputs);
107 }

◆ CreateNetworkFromTextFile()

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

Create the network from a protobuf text file on the disk.

Definition at line 85 of file CaffeParser.cpp.

References ICaffeParser::CreateNetworkFromTextFile().

Referenced by ICaffeParser::CreateNetworkFromTextFile().

89 {
90  return pCaffeParserImpl->CreateNetworkFromTextFile(graphFile, inputShapes, requestedOutputs);
91 }

◆ CreateRaw()

ICaffeParser * CreateRaw ( )
static

Definition at line 70 of file CaffeParser.cpp.

71 {
72  return new ICaffeParser();
73 }

◆ Destroy()

void Destroy ( ICaffeParser parser)
static

Definition at line 80 of file CaffeParser.cpp.

81 {
82  delete parser;
83 }

◆ 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 109 of file CaffeParser.cpp.

110 {
111  return pCaffeParserImpl->GetNetworkInputBindingInfo(name);
112 }

◆ 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 114 of file CaffeParser.cpp.

References CHECK_LOCATION, and armnn::numeric_cast().

115 {
116  return pCaffeParserImpl->GetNetworkOutputBindingInfo(name);
117 }

Friends And Related Function Documentation

◆ CaffeParser

friend class CaffeParser
friend

Definition at line 56 of file ICaffeParser.hpp.

◆ RecordByRecordCaffeParser

friend class RecordByRecordCaffeParser
friend

Definition at line 57 of file ICaffeParser.hpp.


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