22 #include "ngraph/except.hpp"
23 #include "ngraph/node.hpp"
24 #include "onnx_import/utils/onnx_importer_visibility.hpp"
26 namespace ONNX_NAMESPACE
43 : ngraph_error{
"Node (" + node +
"): unknown attribute \'" + name +
"\'"}
55 class ONNX_IMPORTER_API
Node
59 Node(
const ONNX_NAMESPACE::NodeProto& node_proto,
const Graph& graph);
64 Node& operator=(
Node&&) noexcept =
delete;
65 Node& operator=(
const Node&) =
delete;
67 OutputVector get_ng_inputs()
const;
68 OutputVector get_ng_nodes()
const;
69 const std::string& domain()
const;
70 const std::string& op_type()
const;
71 const std::string& get_name()
const;
78 const std::vector<std::reference_wrapper<const std::string>>& get_output_names()
const;
79 const std::string& output(
int index)
const;
80 std::size_t get_outputs_size()
const;
82 bool has_attribute(
const std::string& name)
const;
85 T get_attribute_value(
const std::string& name, T default_value)
const;
88 T get_attribute_value(
const std::string& name)
const;
96 std::unique_ptr<Impl, void (*)(Impl*)> m_pimpl;
99 inline std::ostream& operator<<(std::ostream& outs,
const Node& node)
101 return (outs <<
"<Node(" << node.op_type() <<
"): " << node.
get_description() <<
">");