Class ov::frontend::NodeContext

class NodeContext

Public Functions

inline virtual size_t get_input_size() const

Returns a number of inputs.

inline virtual size_t get_input_size(const std::string &port_name) const

Returns a number of inputs.

inline virtual Output<Node> get_input(int idx) const

Returns exactly one input with a given idx; throws if there is no inputs or there are more than one input.

inline virtual Output<Node> get_input(const std::string &name, int idx) const

Returns exactly one input with a given name and idx; throws if there is no inputs or there are more than one input.

inline virtual Output<Node> get_input(const std::string &name) const

Returns exactly one input with a given name; throws if there is no inputs or there are more than one input.

inline virtual Any get_values_from_const_input(int idx) const

Returns values from Constant input with the given index as ov::Any. Throws an exception if the input cannot be represented as Constant.

template<class T>
inline T get_attribute(const std::string &name) const

Returns node attribute by name.

template<class T>
inline T get_attribute(const std::string &name, const T &def) const

Returns node attribute by name. Returns ‘def’ value if attribute does not exist.

inline 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.

inline virtual size_t get_subgraph_size() const

Returns the number of sub-graphs that can be enumerated with get_subgraph.

inline virtual std::shared_ptr<Model> get_subgraph(int idx) const

Returns subgraph converted on demand by the first access If there is no query for specific sub-graph it shouldn’t be converted idx should be in range 0..get_subgraph_size()-1.