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

Commit

Permalink
fixed map creation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Skalicky authored and Ubuntu committed Feb 13, 2020
1 parent 3631bc7 commit fdd477b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/operator/subgraph/build_subgraph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ void FindOutputEntries(nnvm::Graph* g,
if (node2idx.find(e) == node2idx.end())
node2idx[e] = node2idx.size();
uint32_t i = node2idx[e];
if (output_map->size() < i)
if (output_map->size() > i)
output_map->at(i).push_back(&e);
else
output_map->push_back({&e});
Expand All @@ -516,7 +516,7 @@ void FindOutputEntries(nnvm::Graph* g,
if (node2idx.find(e) == node2idx.end())
node2idx[e] = node2idx.size();
uint32_t i = node2idx[e];
if (output_map->size() < i)
if (output_map->size() > i)
output_map->at(i).push_back(&e);
else
output_map->push_back({&e});
Expand All @@ -537,7 +537,7 @@ void FindOutputEntries(nnvm::Graph* g,
if (node2idx.find(entry) == node2idx.end())
node2idx[entry] = node2idx.size();
uint32_t i = node2idx[entry];
if (output_map->size() < i)
if (output_map->size() > i)
output_map->at(i).push_back(&entry);
else
output_map->push_back({&entry});
Expand Down

0 comments on commit fdd477b

Please sign in to comment.