Class ov::op::v5::Loop#

class Loop : public ov::op::util::SubGraphOp#

Iterate a body over tensors, accumulating into tensors.

Public Functions

Loop() = default#

Constructs a Loop operation.

Loop(const Output<Node> &trip_count, const Output<Node> &execution_condition)#

Constructs a Loop operation.

  • trip_countNode specifies the maximum number of iterations.

  • execution_conditionNode determines whether to execute the first iteration or not.

virtual Output<Node> get_concatenated_slices(const Output<Node> &value, int64_t start, int64_t stride, int64_t part_size, int64_t end, int64_t axis) override#

Concatenates slices from all iterations.

  • value – The value supplying slice values from each iteration.

  • start – First index on axis of the slicing

  • stride – Stepping of the slice

  • part_size – Size of the slice on axis

  • end – The last index on axis of the slicing

  • axis – The axis to slice along


The concatenated slices.

virtual void validate_and_infer_types() override#

Verifies that attributes and inputs are consistent and computes output shapes and element types. Must be implemented by concrete child classes so that it can be run any number of times.

Throws if the node is invalid.

virtual bool evaluate(ov::TensorVector &outputs, const ov::TensorVector &inputs) const override#

Evaluates the op on input_values putting results in output_values.

  • output_values – Tensors for the outputs to compute. One for each result

  • input_values – Tensors for the inputs. One for each inputs.


true if successful

virtual bool has_evaluate() const override#

Allows to get information about availability of evaluate method for the current operation.

struct SpecialBodyPorts#

Allows to define the purpose of inputs/outputs in the body.