ArmNN
 21.02
ITfLiteParser Class Reference

#include <ITfLiteParser.hpp>

Classes

struct  TfLiteParserOptions
 

Public Member Functions

armnn::INetworkPtr CreateNetworkFromBinaryFile (const char *graphFile)
 Create the network from a flatbuffers binary file on disk. More...
 
armnn::INetworkPtr CreateNetworkFromBinary (const std::vector< uint8_t > &binaryContent)
 Create the network from a flatbuffers binary. More...
 
BindingPointInfo GetNetworkInputBindingInfo (size_t subgraphId, const std::string &name) const
 Retrieve binding info (layer id and tensor info) for the network input identified by the given layer name and subgraph id. More...
 
BindingPointInfo GetNetworkOutputBindingInfo (size_t subgraphId, const std::string &name) const
 Retrieve binding info (layer id and tensor info) for the network output identified by the given layer name and subgraph id. More...
 
size_t GetSubgraphCount () const
 Return the number of subgraphs in the parsed model. More...
 
std::vector< std::string > GetSubgraphInputTensorNames (size_t subgraphId) const
 Return the input tensor names for a given subgraph. More...
 
std::vector< std::string > GetSubgraphOutputTensorNames (size_t subgraphId) const
 Return the output tensor names for a given subgraph. More...
 

Static Public Member Functions

static ITfLiteParserCreateRaw (const armnn::Optional< TfLiteParserOptions > &options=armnn::EmptyOptional())
 
static ITfLiteParserPtr Create (const armnn::Optional< TfLiteParserOptions > &options=armnn::EmptyOptional())
 
static void Destroy (ITfLiteParser *parser)
 

Detailed Description

Definition at line 26 of file ITfLiteParser.hpp.

Member Function Documentation

◆ Create()

ITfLiteParserPtr Create ( const armnn::Optional< TfLiteParserOptions > &  options = armnn::EmptyOptional())
static

Definition at line 64 of file TfLiteParser.cpp.

Referenced by main().

65 {
67 }
std::unique_ptr< ITfLiteParser, void(*)(ITfLiteParser *parser)> ITfLiteParserPtr
static void Destroy(ITfLiteParser *parser)
static ITfLiteParser * CreateRaw(const armnn::Optional< TfLiteParserOptions > &options=armnn::EmptyOptional())

◆ CreateNetworkFromBinary()

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

Create the network from a flatbuffers binary.

Definition at line 79 of file TfLiteParser.cpp.

80 {
81  return pTfLiteParserImpl->CreateNetworkFromBinary(binaryContent);
82 }

◆ CreateNetworkFromBinaryFile()

armnn::INetworkPtr CreateNetworkFromBinaryFile ( const char *  graphFile)

Create the network from a flatbuffers binary file on disk.

Definition at line 74 of file TfLiteParser.cpp.

References ITfLiteParser::CreateNetworkFromBinaryFile().

Referenced by ITfLiteParser::CreateNetworkFromBinaryFile().

75 {
76  return pTfLiteParserImpl->CreateNetworkFromBinaryFile(graphFile);
77 }

◆ CreateRaw()

ITfLiteParser * CreateRaw ( const armnn::Optional< TfLiteParserOptions > &  options = armnn::EmptyOptional())
static

Definition at line 59 of file TfLiteParser.cpp.

60 {
61  return new ITfLiteParser(options);
62 }

◆ Destroy()

void Destroy ( ITfLiteParser parser)
static

Definition at line 69 of file TfLiteParser.cpp.

70 {
71  delete parser;
72 }

◆ GetNetworkInputBindingInfo()

BindingPointInfo GetNetworkInputBindingInfo ( size_t  subgraphId,
const std::string &  name 
) const

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

Definition at line 84 of file TfLiteParser.cpp.

86 {
87  return pTfLiteParserImpl->GetNetworkInputBindingInfo(subgraphId, name);
88 }

◆ GetNetworkOutputBindingInfo()

BindingPointInfo GetNetworkOutputBindingInfo ( size_t  subgraphId,
const std::string &  name 
) const

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

Definition at line 90 of file TfLiteParser.cpp.

92 {
93  return pTfLiteParserImpl->GetNetworkOutputBindingInfo(subgraphId, name);
94 }

◆ GetSubgraphCount()

size_t GetSubgraphCount ( ) const

Return the number of subgraphs in the parsed model.

Definition at line 96 of file TfLiteParser.cpp.

97 {
98  return pTfLiteParserImpl->GetSubgraphCount();
99 }

◆ GetSubgraphInputTensorNames()

std::vector< std::string > GetSubgraphInputTensorNames ( size_t  subgraphId) const

Return the input tensor names for a given subgraph.

Definition at line 101 of file TfLiteParser.cpp.

102 {
103  return pTfLiteParserImpl->GetSubgraphInputTensorNames(subgraphId);
104 }

◆ GetSubgraphOutputTensorNames()

std::vector< std::string > GetSubgraphOutputTensorNames ( size_t  subgraphId) const

Return the output tensor names for a given subgraph.

Definition at line 106 of file TfLiteParser.cpp.

References CheckLocation::FileLine(), and CheckLocation::m_Function.

107 {
108  return pTfLiteParserImpl->GetSubgraphOutputTensorNames(subgraphId);
109 }

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