class ov::frontend::NodeContext¶
Overview¶
#include <node_context.hpp>
class NodeContext
{
public:
// construction
NodeContext(const std::string& op_type);
// methods
virtual size_t get_input_size() const;
virtual size_t get_input_size(const std::string& port_name) const;
virtual Output<Node> get_input(int idx) const;
virtual Output<Node> get_input(const std::string& name, int idx) const;
virtual Output<Node> get_input(const std::string& name) const;
virtual const std::string& get_op_type() const;
template <class T>
T get_attribute(const std::string& name) const;
template <class T>
T get_attribute(const std::string& name, const T& def) const;
bool has_attribute(const std::string& name) const;
virtual ov::Any get_attribute_as_any(const std::string& name) const = 0;
};
Detailed Documentation¶
Methods¶
virtual size_t get_input_size() const
Returns a number of inputs.
virtual size_t get_input_size(const std::string& port_name) const
Returns a number of inputs.
Returns exactly one input with a given idx; throws if there is no inputs or there are more than one input.
Returns exactly one input with a given name and idx; throws if there is no inputs or there are more than one input.
Returns exactly one input with a given name; throws if there is no inputs or there are more than one input.
template <class T>
T get_attribute(const std::string& name) const
Returns node attribute by name.
template <class T>
T get_attribute(const std::string& name, const T& def) const
Returns node attribute by name. Returns ‘def’ value if attribute does not exist.
bool has_attribute(const std::string& name) const
Check if an attribute of a given name exist.
virtual ov::Any get_attribute_as_any(const std::string& name) const = 0
Returns node attribute by name as ov::Any.