Skip to content

Commit

Permalink
[NGRAPH] Fix convert_prec pass for variables
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Peskov <[email protected]>
  • Loading branch information
AlexPeskov committed Aug 11, 2020
1 parent 7079025 commit cfd4350
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ngraph/core/src/op/read_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ void op::ReadValue::validate_and_infer_types()
auto output_shape = get_input_partial_shape(0);

VariableInfo info = {output_shape, arg_t, m_variable_id};
m_variable = std::make_shared<Variable>(info);
if (m_variable == nullptr)
m_variable = std::make_shared<Variable>(info);
else
m_variable->update(info);
set_output_type(0, arg_t, output_shape);
}

Expand Down

0 comments on commit cfd4350

Please sign in to comment.