ArmNN
 25.11
Loading...
Searching...
No Matches
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.
armnn::INetworkPtr CreateNetworkFromBinary (const std::vector< uint8_t > &binaryContent)
 Create the network from a flatbuffers binary.
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.
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.
size_t GetSubgraphCount () const
 Return the number of subgraphs in the parsed model.
std::vector< std::string > GetSubgraphInputTensorNames (size_t subgraphId) const
 Return the input tensor names for a given subgraph.
std::vector< std::string > GetSubgraphOutputTensorNames (size_t subgraphId) const
 Return the output tensor names for a given subgraph.

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

Definition at line 67 of file TfLiteParser.cpp.

68{
69 return ITfLiteParserPtr(CreateRaw(options), &ITfLiteParser::Destroy);
70}
std::unique_ptr< ITfLiteParser, void(*)(ITfLiteParser *parser)> ITfLiteParserPtr

References CreateRaw(), and Destroy().

◆ CreateNetworkFromBinary()

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

Create the network from a flatbuffers binary.

Definition at line 82 of file TfLiteParser.cpp.

83{
84 return pTfLiteParserImpl->CreateNetworkFromBinary(binaryContent);
85}

◆ CreateNetworkFromBinaryFile()

armnn::INetworkPtr CreateNetworkFromBinaryFile ( const char * graphFile)

Create the network from a flatbuffers binary file on disk.

Definition at line 77 of file TfLiteParser.cpp.

78{
79 return pTfLiteParserImpl->CreateNetworkFromBinaryFile(graphFile);
80}

◆ CreateRaw()

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

Definition at line 62 of file TfLiteParser.cpp.

63{
64 return new ITfLiteParser(options);
65}

Referenced by Create().

◆ Destroy()

void Destroy ( ITfLiteParser * parser)
static

Definition at line 72 of file TfLiteParser.cpp.

73{
74 delete parser;
75}

Referenced by Create().

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

89{
90 return pTfLiteParserImpl->GetNetworkInputBindingInfo(subgraphId, name);
91}

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

95{
96 return pTfLiteParserImpl->GetNetworkOutputBindingInfo(subgraphId, name);
97}

◆ GetSubgraphCount()

size_t GetSubgraphCount ( ) const

Return the number of subgraphs in the parsed model.

Definition at line 99 of file TfLiteParser.cpp.

100{
101 return pTfLiteParserImpl->GetSubgraphCount();
102}

◆ GetSubgraphInputTensorNames()

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

Return the input tensor names for a given subgraph.

Definition at line 104 of file TfLiteParser.cpp.

105{
106 return pTfLiteParserImpl->GetSubgraphInputTensorNames(subgraphId);
107}

◆ GetSubgraphOutputTensorNames()

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

Return the output tensor names for a given subgraph.

Definition at line 109 of file TfLiteParser.cpp.

110{
111 return pTfLiteParserImpl->GetSubgraphOutputTensorNames(subgraphId);
112}

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