Reset Variable to dynamic state in revalidate_and_infer function of ReadValue op (#4430)
This commit is contained in:
@@ -237,7 +237,7 @@ namespace ngraph
|
||||
void set_output_size(size_t output_size);
|
||||
|
||||
void invalidate_values();
|
||||
void revalidate_and_infer_types()
|
||||
virtual void revalidate_and_infer_types()
|
||||
{
|
||||
invalidate_values();
|
||||
validate_and_infer_types();
|
||||
|
||||
@@ -112,6 +112,8 @@ namespace ngraph
|
||||
|
||||
void validate_and_infer_types() override;
|
||||
|
||||
void revalidate_and_infer_types() override;
|
||||
|
||||
std::shared_ptr<Node>
|
||||
clone_with_new_inputs(const OutputVector& new_args) const override;
|
||||
|
||||
|
||||
@@ -97,4 +97,12 @@ bool op::v6::ReadValue::visit_attributes(AttributeVisitor& visitor)
|
||||
NGRAPH_OP_SCOPE(v6_ReadValue_visit_attributes);
|
||||
visitor.on_attribute("variable_id", m_variable);
|
||||
return true;
|
||||
}
|
||||
|
||||
void op::v6::ReadValue::revalidate_and_infer_types()
|
||||
{
|
||||
VariableInfo var_info{
|
||||
PartialShape::dynamic(), element::dynamic, m_variable->get_info().variable_id};
|
||||
m_variable->update(var_info);
|
||||
Node::revalidate_and_infer_types();
|
||||
}
|
||||
Reference in New Issue
Block a user