ONNX importer features namespace. Functions in this namespace make it possible to use ONNX models. More...
Data Structures | |
class | Attribute |
class | Graph |
class | GraphCache |
GraphCache stores and provides access to ONNX graph initializers. More... | |
class | Model |
class | Node |
class | NullNode |
Represents a missing optional input or output of an ONNX node. More... | |
class | OperatorsBridge |
class | Subgraph |
Representation of ONNX subgraph. It is used for example by ONNX Loop op. It has access for initializers both from subgraph and from parent graph cache. More... | |
class | SubgraphCache |
class | Tensor |
class | ValueInfo |
Typedefs | |
using | AttributeProto_AttributeType = decltype(ONNX_NAMESPACE::AttributeProto{}.type()) |
using | Operator = std::function< OutputVector(const Node &)> |
Function which transforms single ONNX operator to nGraph sub-graph. | |
using | OperatorSet = std::unordered_map< std::string, std::reference_wrapper< const Operator > > |
Map which contains ONNX operators accessible by std::string value as a key. | |
using | TensorProto_DataType = decltype(ONNX_NAMESPACE::TensorProto{}.data_type()) |
Functions | |
std::ostream & | operator<< (std::ostream &outs, const Graph &graph) |
std::string | get_node_domain (const ONNX_NAMESPACE::NodeProto &node_proto) |
std::ostream & | operator<< (std::ostream &outs, const Model &model) |
std::ostream & | operator<< (std::ostream &outs, const Node &node) |
std::ostream & | operator<< (std::ostream &outs, const Tensor &tensor) |
std::ostream & | operator<< (std::ostream &outs, const ValueInfo &info) |
ONNX_IMPORTER_API std::set< std::string > | get_supported_operators (std::int64_t version, const std::string &domain) |
Returns a set of names of supported operators for the given opset version and domain. More... | |
ONNX_IMPORTER_API bool | is_operator_supported (const std::string &op_name, std::int64_t version, const std::string &domain="ai.onnx") |
Determines whether ONNX operator is supported. More... | |
ONNX_IMPORTER_API std::shared_ptr< Function > | import_onnx_model (std::istream &stream) |
Imports and converts an serialized ONNX model from the input stream to an nGraph Function representation. More... | |
ONNX_IMPORTER_API std::shared_ptr< Function > | import_onnx_model (const std::string &file_path) |
Imports and converts an ONNX model from the input file to an nGraph Function representation. More... | |
ONNX_IMPORTER_API void | register_operator (const std::string &name, std::int64_t version, const std::string &domain, Operator fn) |
Registers ONNX custom operator. The function performs the registration of external ONNX operator which is not part of ONNX importer. More... | |
Variables | |
const std::string | OPENVINO_ONNX_DOMAIN = "org.openvinotoolkit" |
ONNX importer features namespace. Functions in this namespace make it possible to use ONNX models.
ONNX_IMPORTER_API std::set<std::string> ngraph::onnx_import::get_supported_operators | ( | std::int64_t | version, |
const std::string & | domain | ||
) |
Returns a set of names of supported operators for the given opset version and domain.
[in] | version | An opset version to get the supported operators for. |
[in] | domain | A domain to get the supported operators for. |
ONNX_IMPORTER_API std::shared_ptr<Function> ngraph::onnx_import::import_onnx_model | ( | const std::string & | file_path | ) |
Imports and converts an ONNX model from the input file to an nGraph Function representation.
[in] | file_path | The path to a file containing the ONNX model (relative or absolute). |
ONNX_IMPORTER_API std::shared_ptr<Function> ngraph::onnx_import::import_onnx_model | ( | std::istream & | stream | ) |
Imports and converts an serialized ONNX model from the input stream to an nGraph Function representation.
[in] | stream | The input stream (e.g. file stream, memory stream, etc). |
ONNX_IMPORTER_API bool ngraph::onnx_import::is_operator_supported | ( | const std::string & | op_name, |
std::int64_t | version, | ||
const std::string & | domain = "ai.onnx" |
||
) |
Determines whether ONNX operator is supported.
[in] | op_name | The ONNX operator name. |
[in] | version | The ONNX operator set version. |
[in] | domain | The domain the ONNX operator is registered to. If not set, the default domain "ai.onnx" is used. |
ONNX_IMPORTER_API void ngraph::onnx_import::register_operator | ( | const std::string & | name, |
std::int64_t | version, | ||
const std::string & | domain, | ||
Operator | fn | ||
) |
Registers ONNX custom operator. The function performs the registration of external ONNX operator which is not part of ONNX importer.
name | The ONNX operator name. |
version | The ONNX operator set version. |
domain | The domain the ONNX operator is registered to. |
fn | The function providing the implementation of the operator which transforms the single ONNX operator to an nGraph sub-graph. |