24.02
|
#include <OnnxParser.hpp>
Public Types | |
using | GraphPtr = std::unique_ptr< onnx::GraphProto > |
Public Member Functions | |
armnn::INetworkPtr | CreateNetworkFromBinaryFile (const char *graphFile) |
Create the network from a protobuf binary file on disk. More... | |
armnn::INetworkPtr | CreateNetworkFromBinaryFile (const char *graphFile, const std::map< std::string, armnn::TensorShape > &inputShapes) |
Create the network from a protobuf binary file on disk, with inputShapes specified. More... | |
armnn::INetworkPtr | CreateNetworkFromBinary (const std::vector< uint8_t > &binaryContent) |
Create the network from a protobuf binary. More... | |
armnn::INetworkPtr | CreateNetworkFromBinary (const std::vector< uint8_t > &binaryContent, const std::map< std::string, armnn::TensorShape > &inputShapes) |
Create the network from a protobuf binary, with inputShapes specified. More... | |
armnn::INetworkPtr | CreateNetworkFromTextFile (const char *graphFile) |
Create the network from a protobuf text file on disk. More... | |
armnn::INetworkPtr | CreateNetworkFromTextFile (const char *graphFile, const std::map< std::string, armnn::TensorShape > &inputShapes) |
Create the network from a protobuf text file on disk, with inputShapes specified. More... | |
armnn::INetworkPtr | CreateNetworkFromString (const std::string &protoText) |
Create the network directly from protobuf text in a string. Useful for debugging/testing. More... | |
armnn::INetworkPtr | CreateNetworkFromString (const std::string &protoText, const std::map< std::string, armnn::TensorShape > &inputShapes) |
Create the network directly from protobuf text in a string, with inputShapes specified. 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... | |
OnnxParserImpl () | |
~OnnxParserImpl ()=default | |
template<typename TypePair , typename Location > | |
void | ValidateInputs (const onnx::NodeProto &node, TypePair validInputs, const Location &location) |
Static Public Member Functions | |
static ModelPtr | LoadModelFromBinary (const std::vector< uint8_t > &binaryContent) |
static ModelPtr | LoadModelFromBinaryFile (const char *fileName) |
static ModelPtr | LoadModelFromTextFile (const char *fileName) |
static ModelPtr | LoadModelFromString (const std::string &inputString) |
static std::vector< std::string > | GetInputs (ModelPtr &model) |
Retrieve inputs names. More... | |
static std::vector< std::string > | GetOutputs (ModelPtr &model) |
Retrieve outputs names. More... | |
static const std::string | GetVersion () |
Retrieve version in X.Y.Z form. More... | |
Definition at line 25 of file OnnxParser.hpp.
using GraphPtr = std::unique_ptr<onnx::GraphProto> |
Definition at line 32 of file OnnxParser.hpp.
OnnxParserImpl | ( | ) |
Definition at line 578 of file OnnxParser.cpp.
|
default |
INetworkPtr CreateNetworkFromBinary | ( | const std::vector< uint8_t > & | binaryContent | ) |
Create the network from a protobuf binary.
Definition at line 773 of file OnnxParser.cpp.
References OnnxParserImpl::LoadModelFromBinary().
INetworkPtr CreateNetworkFromBinary | ( | const std::vector< uint8_t > & | binaryContent, |
const std::map< std::string, armnn::TensorShape > & | inputShapes | ||
) |
Create the network from a protobuf binary, with inputShapes specified.
Definition at line 780 of file OnnxParser.cpp.
References OnnxParserImpl::LoadModelFromBinary().
INetworkPtr CreateNetworkFromBinaryFile | ( | const char * | graphFile | ) |
Create the network from a protobuf binary file on disk.
Definition at line 839 of file OnnxParser.cpp.
References OnnxParserImpl::LoadModelFromBinaryFile().
INetworkPtr CreateNetworkFromBinaryFile | ( | const char * | graphFile, |
const std::map< std::string, armnn::TensorShape > & | inputShapes | ||
) |
Create the network from a protobuf binary file on disk, with inputShapes specified.
Definition at line 846 of file OnnxParser.cpp.
References OnnxParserImpl::LoadModelFromBinaryFile().
INetworkPtr CreateNetworkFromString | ( | const std::string & | protoText | ) |
Create the network directly from protobuf text in a string. Useful for debugging/testing.
Definition at line 874 of file OnnxParser.cpp.
References OnnxParserImpl::LoadModelFromString().
INetworkPtr CreateNetworkFromString | ( | const std::string & | protoText, |
const std::map< std::string, armnn::TensorShape > & | inputShapes | ||
) |
Create the network directly from protobuf text in a string, with inputShapes specified.
Useful for debugging/testing
Definition at line 881 of file OnnxParser.cpp.
References OnnxParserImpl::LoadModelFromString().
INetworkPtr CreateNetworkFromTextFile | ( | const char * | graphFile | ) |
Create the network from a protobuf text file on disk.
Definition at line 757 of file OnnxParser.cpp.
References OnnxParserImpl::LoadModelFromTextFile().
INetworkPtr CreateNetworkFromTextFile | ( | const char * | graphFile, |
const std::map< std::string, armnn::TensorShape > & | inputShapes | ||
) |
Create the network from a protobuf text file on disk, with inputShapes specified.
Definition at line 764 of file OnnxParser.cpp.
References OnnxParserImpl::LoadModelFromTextFile().
|
static |
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 2623 of file OnnxParser.cpp.
References CHECK_LOCATION.
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.
Definition at line 2642 of file OnnxParser.cpp.
References CHECK_LOCATION.
|
static |
|
static |
Retrieve version in X.Y.Z form.
Definition at line 2700 of file OnnxParser.cpp.
References ONNX_PARSER_VERSION.
|
static |
Definition at line 789 of file OnnxParser.cpp.
References CHECK_LOCATION, and armnn::error.
Referenced by OnnxParserImpl::CreateNetworkFromBinary().
|
static |
Definition at line 811 of file OnnxParser.cpp.
References CHECK_LOCATION, and armnn::error.
Referenced by OnnxParserImpl::CreateNetworkFromBinaryFile().
|
static |
Definition at line 855 of file OnnxParser.cpp.
References CHECK_LOCATION, and armnn::error.
Referenced by OnnxParserImpl::CreateNetworkFromString().
|
static |
Definition at line 732 of file OnnxParser.cpp.
References CHECK_LOCATION, and armnn::error.
Referenced by OnnxParserImpl::CreateNetworkFromTextFile().
void ValidateInputs | ( | const onnx::NodeProto & | node, |
TypePair | validInputs, | ||
const Location & | location | ||
) |
Definition at line 494 of file OnnxParser.cpp.