Class ov::op::v0::Result#

class Result : public ov::op::Op#

Result operation.

The Result output tensor is special, it shares tensor with Result’s input but requires to have dedicated properties like:

  • tensor names.

Setting/adding Result’s output names modify this specific tensor names. Result’s specific tensor names are added to input descriptor and transferred to new descriptor if Result’s input has been replaced.

Examples 1: No specific names on Result’s output

set output names: [N1] ↓ |————-—| [names: N1] |————–—| | Node |—————————>| Result | -> Model output names: N1 |————-—| |————–—|

Examples 2: Result’s has got specific names

set output names: set output names: [N1] [R1, R2] ↓ ↓ |————-—| [names: N1, R1, R2] |————–—| | Node |—————————>| Result | -> Model output names: R1, R2 |————-—| |————–—|

Examples 3: Result from example 2 connected to new node

set output names: set output names: [N2] [R1, R2] ↓ ↓ |————-—| [names: N2, R1, R2] |————–—| | Node |—————————>| Result | -> Model output names: R1, R2 |————-—| |————–—|

set output names: [N1] ↓ |————-—| [names: N1] | Node |————–—> |————-—|

Public Functions

Result() = default#

Allows a value to be used as a function result.

Result(const Output<Node> &arg)#

Allows a value to be used as a function result.

Parameters:

argNode that produces the input tensor.

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.

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

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

Returns:

true if successful

virtual bool has_evaluate() const override#

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

Layout get_layout() const#

Returns current layout, or empty Layout if it is not set.

void set_layout(const Layout &layout)#

Sets layout runtime information to tensor.

Parameters:

layoutLayout to set. If empty (default constructed), layout runtime information is erased.