ArmNN
 21.02
ITfParser Class Reference

Parses a directed acyclic graph from a tensorflow protobuf file. More...

#include <ITfParser.hpp>

Classes

struct  TfParserImpl
 

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/testing. 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 ITfParserCreateRaw ()
 
static ITfParserPtr Create ()
 
static void Destroy (ITfParser *parser)
 

Friends

template<typename T >
class ParsedConstTfOperation
 
class ParsedMatMulTfOperation
 
class ParsedMulTfOperation
 
class ParsedTfOperation
 
class SingleLayerParsedTfOperation
 
class DeferredSingleLayerParsedTfOperation
 
class ParsedIdentityTfOperation
 
template<template< typename > class OperatorType, typename T >
struct MakeTfOperation
 

Detailed Description

Parses a directed acyclic graph from a tensorflow protobuf file.

Definition at line 25 of file ITfParser.hpp.

Member Function Documentation

◆ Create()

ITfParserPtr Create ( )
static

Definition at line 48 of file TfParser.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

49 {
51 }
static ITfParser * CreateRaw()
Definition: TfParser.cpp:43
std::unique_ptr< ITfParser, void(*)(ITfParser *parser)> ITfParserPtr
Definition: ITfParser.hpp:22
static void Destroy(ITfParser *parser)
Definition: TfParser.cpp:53

◆ 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 65 of file TfParser.cpp.

68 {
69  return pTfParserImpl->CreateNetworkFromBinaryFile(graphFile, inputShapes, requestedOutputs);
70 }

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

Definition at line 72 of file TfParser.cpp.

75 {
76  return pTfParserImpl->CreateNetworkFromString(protoText, inputShapes, requestedOutputs);
77 }

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

References ITfParser::CreateNetworkFromTextFile().

Referenced by ITfParser::CreateNetworkFromTextFile().

61 {
62  return pTfParserImpl->CreateNetworkFromTextFile(graphFile, inputShapes, requestedOutputs);
63 }

◆ CreateRaw()

ITfParser * CreateRaw ( )
static

Definition at line 43 of file TfParser.cpp.

44 {
45  return new ITfParser();
46 }

◆ Destroy()

void Destroy ( ITfParser parser)
static

Definition at line 53 of file TfParser.cpp.

54 {
55  delete parser;
56 }

◆ 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 79 of file TfParser.cpp.

80 {
81  return pTfParserImpl->GetNetworkInputBindingInfo(name);
82 }

◆ GetNetworkOutputBindingInfo()

BindingPointInfo GetNetworkOutputBindingInfo ( const std::string &  name) const

Friends And Related Function Documentation

◆ DeferredSingleLayerParsedTfOperation

friend class DeferredSingleLayerParsedTfOperation
friend

◆ MakeTfOperation

friend struct MakeTfOperation
friend

Definition at line 67 of file ITfParser.hpp.

Referenced by armnnTfParser::ConvertTfTensorDataType().

◆ ParsedConstTfOperation

friend class ParsedConstTfOperation
friend

Definition at line 58 of file ITfParser.hpp.

Referenced by ITfParser::TfParserImpl::ParseIdentity().

◆ ParsedIdentityTfOperation

friend class ParsedIdentityTfOperation
friend

Definition at line 64 of file ITfParser.hpp.

Referenced by ITfParser::TfParserImpl::ParseBiasAdd().

◆ ParsedMatMulTfOperation

friend class ParsedMatMulTfOperation
friend

Definition at line 59 of file ITfParser.hpp.

Referenced by ITfParser::TfParserImpl::ParseLrn().

◆ ParsedMulTfOperation

friend class ParsedMulTfOperation
friend

Definition at line 60 of file ITfParser.hpp.

Referenced by ITfParser::TfParserImpl::ParseMean().

◆ ParsedTfOperation

◆ SingleLayerParsedTfOperation

friend class SingleLayerParsedTfOperation
friend

Definition at line 62 of file ITfParser.hpp.


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