7 #include "ngraph/op/op.hpp"
8 #include "ngraph/op/util/variable.hpp"
9 #include "ngraph/op/util/variable_extension.hpp"
18 NGRAPH_RTTI_DECLARATION;
36 NGRAPH_RTTI_DECLARATION;
48 clone_with_new_inputs(
const OutputVector& new_args)
const override;
55 std::string m_variable_id;
66 NGRAPH_RTTI_DECLARATION;
76 const std::shared_ptr<Variable>& variable);
80 void revalidate_and_infer_types()
override;
83 clone_with_new_inputs(
const OutputVector& new_args)
const override;
89 NGRAPH_CHECK(m_variable,
90 "Variable is not initialized. Variable_id is unavailable");
91 return m_variable->get_info().variable_id;
95 const HostTensorVector& inputs,
99 bool constant_fold(OutputVector& output_values,
100 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
Root of all actual ops.
Definition: op.hpp:17
Definition: read_value.hpp:16
ReadValueBase(const OutputVector &arguments)
Constructs an AssignBase operation.
Definition: read_value.hpp:23
ReadValue operation creates the variable with variable_id and returns value of this variable.
Definition: read_value.hpp:34
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: read_value.hpp:52
ReadValue(const Output< Node > &init_value, const std::string &variable_id)
Constructs a ReadValue operation.
ReadValue operation gets an input value from the variable with variable_id and returns it as an outpu...
Definition: read_value.hpp:64
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....
std::string get_variable_id() const override
Returns the identifier of corresponding variable.
Definition: read_value.hpp:87
ReadValue(const Output< Node > &init_value, const std::shared_ptr< Variable > &variable)
Constructs a ReadValue operation.
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16
std::map< std::string, std::shared_ptr< Variant > > EvaluationContext
Definition: node.hpp:63