7 #include "ngraph/op/sink.hpp"
8 #include "ngraph/op/util/variable.hpp"
9 #include "ngraph/op/util/variable_extension.hpp"
18 NGRAPH_RTTI_DECLARATION;
33 NGRAPH_RTTI_DECLARATION;
46 clone_with_new_inputs(
const OutputVector& new_args)
const override;
51 std::string m_variable_id;
60 NGRAPH_RTTI_DECLARATION;
74 clone_with_new_inputs(
const OutputVector& new_args)
const override;
80 NGRAPH_CHECK(m_variable,
81 "Variable is not initialized. Variable_id is unavailable");
82 return m_variable->get_info().variable_id;
85 const HostTensorVector& inputs,
88 bool constant_fold(OutputVector& output_values,
89 const OutputVector& inputs_values)
override;
Visits the attributes of a node, primarily for serialization-like tasks.
Definition: attribute_visitor.hpp:59
A handle for one of a node's outputs.
Definition: node_output.hpp:33
Definition: variable_extension.hpp:13
Definition: assign.hpp:16
AssignBase(const OutputVector &arguments)
Constructs an AssignBase operation.
Definition: assign.hpp:21
Root of nodes that can be sink nodes.
Definition: sink.hpp:17
Assign operation sets an input value to the variable with variable_id
Definition: assign.hpp:31
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
std::string get_variable_id() const override
Returns the identifier of corresponding variable.
Definition: assign.hpp:43
Assign(const Output< Node > &new_value, const std::string &variable_id)
Constructs an Assign operation.
Assign operation sets an input value to the variable with variable_id
Definition: assign.hpp:58
bool has_evaluate() const override
Allows to get information about availability of evaluate method for the current operation.
bool evaluate(const HostTensorVector &outputs, const HostTensorVector &inputs, const EvaluationContext &evaluation_context) const override
Evaluates the op on input_values putting results in output_values.
void validate_and_infer_types() override
Verifies that attributes and inputs are consistent and computes output shapes and element types....
Assign(const Output< Node > &new_value, const std::shared_ptr< Variable > &variable)
Constructs an Assign operation.
std::string get_variable_id() const override
Returns the identifier of corresponding variable.
Definition: assign.hpp:78
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16
std::map< std::string, std::shared_ptr< Variant > > EvaluationContext
Definition: node.hpp:63