|
25.11
|
#include <TfLiteParser.hpp>
Public Types | |
| using | ModelPtr = std::unique_ptr<tflite::ModelT> |
| using | SubgraphPtr = std::unique_ptr<tflite::SubGraphT> |
| using | OperatorPtr = std::unique_ptr<tflite::OperatorT> |
| using | OperatorCodePtr = std::unique_ptr<tflite::OperatorCodeT> |
| using | TensorPtr = std::unique_ptr<tflite::TensorT> |
| using | TensorRawPtr = const tflite::TensorT * |
| using | TensorRawPtrVector = std::vector<TensorRawPtr> |
| using | TensorIdRawPtr = std::pair<size_t, TensorRawPtr> |
| using | TensorIdRawPtrVector = std::vector<TensorIdRawPtr> |
| using | BufferPtr = std::unique_ptr<tflite::BufferT> |
| using | BufferRawPtr = const tflite::BufferT * |
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. | |
| TfLiteParserImpl (const armnn::Optional< ITfLiteParser::TfLiteParserOptions > &options=armnn::EmptyOptional()) | |
| ~TfLiteParserImpl ()=default | |
| armnn::INetworkPtr | CreateNetworkFromBinaryAsDynamic (const std::vector< uint8_t > &binaryContent) |
| armnn::INetworkPtr | LoadModel (std::unique_ptr< tflite::ModelT > model) |
Static Public Member Functions | |
| static ModelPtr | LoadModelFromFile (const char *fileName) |
| static ModelPtr | LoadModelFromBinary (const uint8_t *binaryContent, size_t len) |
| static TensorRawPtrVector | GetInputs (const ModelPtr &model, size_t subgraphIndex, size_t operatorIndex) |
| static TensorRawPtrVector | GetOutputs (const ModelPtr &model, size_t subgraphIndex, size_t operatorIndex) |
| static TensorIdRawPtrVector | GetSubgraphInputs (const ModelPtr &model, size_t subgraphIndex) |
| static TensorIdRawPtrVector | GetSubgraphOutputs (const ModelPtr &model, size_t subgraphIndex) |
| static std::vector< int32_t > & | GetInputTensorIds (const ModelPtr &model, size_t subgraphIndex, size_t operatorIndex) |
| static std::vector< int32_t > & | GetOutputTensorIds (const ModelPtr &model, size_t subgraphIndex, size_t operatorIndex) |
| static BufferRawPtr | GetBuffer (const ModelPtr &model, size_t bufferIndex) |
| static armnn::TensorInfo | OutputShapeOfSqueeze (std::vector< uint32_t > squeezeDims, const armnn::TensorInfo &inputTensorInfo) |
| static armnn::TensorInfo | OutputShapeOfReshape (const armnn::TensorInfo &inputTensorInfo, const std::vector< int32_t > &targetDimsIn) |
| static const std::string | GetVersion () |
| Retrieve version in X.Y.Z form. | |
Definition at line 26 of file TfLiteParser.hpp.
| using BufferPtr = std::unique_ptr<tflite::BufferT> |
Definition at line 39 of file TfLiteParser.hpp.
| using BufferRawPtr = const tflite::BufferT * |
Definition at line 40 of file TfLiteParser.hpp.
| using ModelPtr = std::unique_ptr<tflite::ModelT> |
Definition at line 30 of file TfLiteParser.hpp.
| using OperatorCodePtr = std::unique_ptr<tflite::OperatorCodeT> |
Definition at line 33 of file TfLiteParser.hpp.
| using OperatorPtr = std::unique_ptr<tflite::OperatorT> |
Definition at line 32 of file TfLiteParser.hpp.
| using SubgraphPtr = std::unique_ptr<tflite::SubGraphT> |
Definition at line 31 of file TfLiteParser.hpp.
| using TensorIdRawPtr = std::pair<size_t, TensorRawPtr> |
Definition at line 37 of file TfLiteParser.hpp.
| using TensorIdRawPtrVector = std::vector<TensorIdRawPtr> |
Definition at line 38 of file TfLiteParser.hpp.
| using TensorPtr = std::unique_ptr<tflite::TensorT> |
Definition at line 34 of file TfLiteParser.hpp.
| using TensorRawPtr = const tflite::TensorT * |
Definition at line 35 of file TfLiteParser.hpp.
| using TensorRawPtrVector = std::vector<TensorRawPtr> |
Definition at line 36 of file TfLiteParser.hpp.
| TfLiteParserImpl | ( | const armnn::Optional< ITfLiteParser::TfLiteParserOptions > & | options = armnn::EmptyOptional() | ) |
Definition at line 771 of file TfLiteParser.cpp.
References TfLiteParserImpl().
Referenced by CreateNetworkFromBinaryAsDynamic(), and TfLiteParserImpl().
|
default |
| INetworkPtr CreateNetworkFromBinary | ( | const std::vector< uint8_t > & | binaryContent | ) |
Create the network from a flatbuffers binary.
Definition at line 991 of file TfLiteParser.cpp.
References LoadModelFromBinary().
| armnn::INetworkPtr CreateNetworkFromBinaryAsDynamic | ( | const std::vector< uint8_t > & | binaryContent | ) |
References TfLiteParserImpl().
| INetworkPtr CreateNetworkFromBinaryFile | ( | const char * | graphFile | ) |
Create the network from a flatbuffers binary file on disk.
Definition at line 984 of file TfLiteParser.cpp.
References LoadModelFromFile().
|
static |
Definition at line 5848 of file TfLiteParser.cpp.
References CHECK_BUFFER.
|
static |
Definition at line 5536 of file TfLiteParser.cpp.
References CHECK_MODEL, and CHECKED_NON_NEGATIVE.
|
static |
Definition at line 5616 of file TfLiteParser.cpp.
References CHECK_MODEL.
| 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 6026 of file TfLiteParser.cpp.
References CHECK_LOCATION, CHECK_SUBGRAPH, GetSubgraphInputs(), and TensorInfo::SetConstant().
| 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 6058 of file TfLiteParser.cpp.
References CHECK_LOCATION, CHECK_SUBGRAPH, and GetSubgraphOutputs().
|
static |
Definition at line 5563 of file TfLiteParser.cpp.
References CHECK_MODEL, CHECK_TENSOR, and CHECKED_NON_NEGATIVE.
|
static |
Definition at line 5626 of file TfLiteParser.cpp.
References CHECK_MODEL.
| size_t GetSubgraphCount | ( | ) | const |
Return the number of subgraphs in the parsed model.
Definition at line 6090 of file TfLiteParser.cpp.
|
static |
Definition at line 5583 of file TfLiteParser.cpp.
References CHECK_SUBGRAPH, CHECK_TENSOR, and CHECKED_NON_NEGATIVE.
Referenced by GetNetworkInputBindingInfo(), and GetSubgraphInputTensorNames().
| std::vector< std::string > GetSubgraphInputTensorNames | ( | size_t | subgraphId | ) | const |
Return the input tensor names for a given subgraph.
Definition at line 6095 of file TfLiteParser.cpp.
References CHECK_SUBGRAPH, and GetSubgraphInputs().
|
static |
Definition at line 5600 of file TfLiteParser.cpp.
References CHECK_SUBGRAPH, and CHECKED_NON_NEGATIVE.
Referenced by GetNetworkOutputBindingInfo(), and GetSubgraphOutputTensorNames().
| std::vector< std::string > GetSubgraphOutputTensorNames | ( | size_t | subgraphId | ) | const |
Return the output tensor names for a given subgraph.
Definition at line 6108 of file TfLiteParser.cpp.
References CHECK_SUBGRAPH, and GetSubgraphOutputs().
|
static |
Retrieve version in X.Y.Z form.
Definition at line 6121 of file TfLiteParser.cpp.
References TFLITE_PARSER_VERSION.
| armnn::INetworkPtr LoadModel | ( | std::unique_ptr< tflite::ModelT > | model | ) |
Definition at line 999 of file TfLiteParser.cpp.
|
static |
Definition at line 5517 of file TfLiteParser.cpp.
References CHECK_LOCATION.
Referenced by CreateNetworkFromBinary(), and LoadModelFromFile().
|
static |
Definition at line 5487 of file TfLiteParser.cpp.
References CHECK_LOCATION, and LoadModelFromBinary().
Referenced by CreateNetworkFromBinaryFile().
|
static |
Definition at line 3387 of file TfLiteParser.cpp.
References CHECK_LOCATION, TensorInfo::GetNumElements(), armnn::numeric_cast(), and TensorInfo::SetShape().
|
static |
Definition at line 2479 of file TfLiteParser.cpp.
References CHECK_LOCATION, CHECK_VALID_SIZE, TensorInfo::GetNumDimensions(), TensorInfo::GetShape(), and TensorInfo::SetShape().