Class ov::pass::pattern::op::Label#

class Label : public ov::pass::pattern::op::Pattern#

Fails if the predicate returns false on the graph value.

The graph value is added to the matched values list. If the Label is already associated with a value, the match succeeds if the value is the same as the graph value. Otherwise, the label is associated with the graph value and the match succeeds if the pattern input matches the graph value.

DEPRECATED: If no inputs are given to Label, a True node is serves as the input. If more than one inputs are given, an Or pattern of the inputs serves as the input.

Public Functions

inline Label(const element::Type &type, const PartialShape &s, const ValuePredicate pred, const OutputVector &wrapped_values)#

creates a Label node containing a sub-pattern described by

this Label node can be bound only to the nodes in the input graph that match the pattern specified by

See also

type and

See also

shape.

See also

wrapped_nodes Example:

auto add = a + b; // a and b are op::Parameter in this example
auto label = std::make_shared<pattern::op::Label>(element::f32,
                                                  PartialShape{2,2},
                                                  nullptr,
                                                  OutputVector{add});

inline Label(const Output<Node> &value, const ValuePredicate pred, const OutputVector &wrapped_values)#

creates a Label node containing a sub-pattern described by the type and shape of

this Label node can be bound only to the nodes in the input graph that match the pattern specified by

See also

node.

See also

wrapped_values Example:

auto add = a + b; // a and b are op::Parameter in this example
auto label = std::make_shared<pattern::op::Label>(add,
                                                  nullptr,
                                                  OutputVector{add});