class ngraph::onnx_import::Node

Overview

#include <node.hpp>

class Node
{
public:
    // construction

    Node();
    Node(const ONNX_NAMESPACE::NodeProto& node_proto, const Graph& graph);
    Node(Node&&);
    Node(const Node&);

    // methods

    Node& operator = (Node&&);
    Node& operator = (const Node&);
    OutputVector get_ng_inputs() const;
    OutputVector get_ng_nodes() const;
    const std::string& domain() const;
    const std::string& op_type() const;
    const std::string& get_name() const;
    std::vector<std::string> get_attribute_names() const;
    const Attribute& get_attribute(const std::string& name) const;
    const std::string& get_description() const;
    const std::vector<std::reference_wrapper<const std::string>>& get_output_names() const;
    const std::string& output(int index) const;
    std::size_t get_outputs_size() const;
    bool has_attribute(const std::string& name) const;

    Subgraph get_subgraph_from_attribute(
        const std::string& name,
        const std::map<std::size_t, std::string>& carried_dependencies_map
        ) const;

    template <typename T>
    T get_attribute_value(
        const std::string& name,
        T default_value
        ) const;

    template <typename T>
    T get_attribute_value(const std::string& name) const;

    ONNX_IMPORTER_API float get_attribute_value(
        const std::string& name,
        float default_value
        ) const;

    ONNX_IMPORTER_API double get_attribute_value(
        const std::string& name,
        double default_value
        ) const;

    ONNX_IMPORTER_API std::int64_t get_attribute_value(
        const std::string& name,
        std::int64_t default_value
        ) const;

    ONNX_IMPORTER_API std::string get_attribute_value(
        const std::string& name,
        std::string default_value
        ) const;

    ONNX_IMPORTER_API Tensor get_attribute_value(
        const std::string& name,
        Tensor default_value
        ) const;

    ONNX_IMPORTER_API SparseTensor get_attribute_value(
        const std::string& name,
        SparseTensor default_value
        ) const;

    ONNX_IMPORTER_API Graph get_attribute_value(
        const std::string& name,
        Graph default_value
        ) const;

    ONNX_IMPORTER_API std::vector<float> get_attribute_value(
        const std::string& name,
        std::vector<float> default_value
        ) const;

    ONNX_IMPORTER_API std::vector<double> get_attribute_value(
        const std::string& name,
        std::vector<double> default_value
        ) const;

    ONNX_IMPORTER_API std::vector<std::int64_t> get_attribute_value(
        const std::string& name,
        std::vector<std::int64_t> default_value
        ) const;

    ONNX_IMPORTER_API std::vector<std::size_t> get_attribute_value(
        const std::string& name,
        std::vector<std::size_t> default_value
        ) const;

    ONNX_IMPORTER_API std::vector<std::string> get_attribute_value(
        const std::string& name,
        std::vector<std::string> default_value
        ) const;

    ONNX_IMPORTER_API std::vector<Tensor> get_attribute_value(
        const std::string& name,
        std::vector<Tensor> default_value
        ) const;

    ONNX_IMPORTER_API std::vector<SparseTensor> get_attribute_value(
        const std::string& name,
        std::vector<SparseTensor> default_value
        ) const;

    ONNX_IMPORTER_API std::vector<Graph> get_attribute_value(
        const std::string& name,
        std::vector<Graph> default_value
        ) const;

    ONNX_IMPORTER_API float get_attribute_value(const std::string& name) const;
};

Detailed Documentation

Methods

const std::string& get_description() const

Describe the ONNX Node to make debugging graphs easier Function will return the Node ‘s name if it has one, or the names of its outputs.

Returns:

Description of Node