Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
Fix topk deserialize to be backwards compatible (#4172)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkimballn1 authored and silee2 committed Jan 14, 2020
1 parent bc4a08f commit ac27139
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ngraph/serializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2945,7 +2945,8 @@ shared_ptr<Node> JSONDeserializer::deserialize_node(json node_js)
{
auto compute_max = node_js.at("compute_max").get<bool>();
auto target_type = read_element_type(node_js.at("index_element_type"));
op::TopKSortType sort = node_js.at("sort").get<op::TopKSortType>();
op::TopKSortType sort =
get_or_default<op::TopKSortType>(node_js, "sort", op::TopKSortType::SORT_VALUES);
if (has_key(node_js, "top_k_axis"))
{
auto top_k_axis = node_js.at("top_k_axis").get<size_t>();
Expand Down

0 comments on commit ac27139

Please sign in to comment.