Class ov::op::v8::Slice

class Slice : public ov::op::Op

Slice operation.

Public Functions

Slice(const Output<Node> &data, const Output<Node> &start, const Output<Node> &stop, const Output<Node> &step)

Constructs Slice operation (default axes).

Parameters
  • data – The tensor to be sliced.

  • start – 1D tensor with start indices of the slice.

  • stop – 1D tensor with end indices of the slice.

  • step – 1D tensor specifies the increment to use in slicing along corresponding axes.

Slice(const Output<Node> &data, const Output<Node> &start, const Output<Node> &stop, const Output<Node> &step, const Output<Node> &axes)

Constructs Slice operation.

Parameters
  • data – The tensor to be sliced.

  • start – 1D tensor with start indices of the slice.

  • stop – 1D tensor with end indices of the slice.

  • step – 1D tensor specifies the increment to use in slicing along corresponding axes.

  • axes – 1D tensor indicating which dimensions the values in the start and stop apply to.

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 has_evaluate() const override

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