ArmNN
 24.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 63 of file TfLiteParser.cpp.

64 {
66 }

◆ CreateNetworkFromBinary()

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

Create the network from a flatbuffers binary.

Definition at line 78 of file TfLiteParser.cpp.

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

◆ CreateNetworkFromBinaryFile()

armnn::INetworkPtr CreateNetworkFromBinaryFile ( const char *  graphFile)

Create the network from a flatbuffers binary file on disk.

Definition at line 73 of file TfLiteParser.cpp.

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

References ITfLiteParser::CreateNetworkFromBinaryFile().

Referenced by ITfLiteParser::CreateNetworkFromBinaryFile().

◆ CreateRaw()

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

Definition at line 58 of file TfLiteParser.cpp.

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

◆ Destroy()

void Destroy ( ITfLiteParser parser)
static

Definition at line 68 of file TfLiteParser.cpp.

69 {
70  delete parser;
71 }

◆ 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 83 of file TfLiteParser.cpp.

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

◆ 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 89 of file TfLiteParser.cpp.

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

◆ GetSubgraphCount()

size_t GetSubgraphCount ( ) const

Return the number of subgraphs in the parsed model.

Definition at line 95 of file TfLiteParser.cpp.

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

◆ GetSubgraphInputTensorNames()

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

Return the input tensor names for a given subgraph.

Definition at line 100 of file TfLiteParser.cpp.

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

◆ GetSubgraphOutputTensorNames()

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

Return the output tensor names for a given subgraph.

Definition at line 105 of file TfLiteParser.cpp.

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

The documentation for this class was generated from the following files:
armnnTfLiteParser::ITfLiteParser::CreateRaw
static ITfLiteParser * CreateRaw(const armnn::Optional< TfLiteParserOptions > &options=armnn::EmptyOptional())
Definition: TfLiteParser.cpp:58
armnnTfLiteParser::ITfLiteParser::Destroy
static void Destroy(ITfLiteParser *parser)
Definition: TfLiteParser.cpp:68
armnnTfLiteParser::ITfLiteParserPtr
std::unique_ptr< ITfLiteParser, void(*)(ITfLiteParser *parser)> ITfLiteParserPtr
Definition: ITfLiteParser.hpp:24