class ov::descriptor::Input

Overview

#include <input.hpp>

class Input
{
public:
    // construction

    Input(Node \* node, size_t index, Output& output);
    Input(Node \* node, size_t index);
    Input(const Input&);
    Input(Input&&);

    // methods

    std::shared_ptr<Node> get_node() const;
    Node \* get_raw_pointer_node() const;
    size_t get_index() const;
    const Output& get_output() const;
    Output& get_output();
    bool has_output() const;
    const Tensor& get_tensor() const;
    Tensor& get_tensor();
    RTMap& get_rt_info();
    const RTMap& get_rt_info() const;
    void replace_output(const std::shared_ptr<Node>& node, size_t i);
    void replace_output(Output& output);
    void remove_output();
    bool get_is_relevant_to_shape() const;
    bool get_is_relevant_to_value() const;
    const Shape& get_shape() const;
    const PartialShape& get_partial_shape() const;
    const element::Type& get_element_type() const;
    Input& operator = (const Input&);
};

Detailed Documentation

Construction

Input(Node \* node, size_t index, Output& output)

Parameters:

node

The node that owns this input

index

The position of this tensor in all input tensors

output

The output that supplies a value for this input

Input(Node \* node, size_t index)

Create an Input that is not connected to an output.

Parameters:

node

The node that owns this input

index

The position of this tensor in all input tensors

Methods

std::shared_ptr<Node> get_node() const

Returns:

the node that this is an input of

Node \* get_raw_pointer_node() const

Returns:

the raw pointer to the node that this is an input of

size_t get_index() const

Returns:

the position within all supplied tensors of this input

const Output& get_output() const

Returns:

the connected output

Output& get_output()

Returns:

the connected output

bool has_output() const

Returns:

true if an output is connected to the input.

const Tensor& get_tensor() const

Returns:

the tensor of the connected output

Tensor& get_tensor()

Returns:

the tensor of the connected output

void replace_output(const std::shared_ptr<Node>& node, size_t i)

Replace the current output that supplies a value for this input with output i of node.

void replace_output(Output& output)

Replace the current output that supplies a value for this input with output.

void remove_output()

Remove the output from this input. The node will not be valid until another output is supplied.

bool get_is_relevant_to_shape() const

See Node::set_input_is_relevant_to_shape for more details.

Returns:

true if the value of this input is relevant to the output shapes of the corresponding node. (Usually this is false.)

bool get_is_relevant_to_value() const

See Node::set_input_is_relevant_to_value for more details.

Returns:

true if the value of this input is relevant to the output value of the corresponding node. (Usually this is true.)

const Shape& get_shape() const

Returns:

the shape of the connected output

const PartialShape& get_partial_shape() const

Returns:

the partial shape of the connected output

const element::Type& get_element_type() const

Returns:

the element type of the connected output