Skip to content

Commit

Permalink
fix to skip node not in graph. (apache#5238)
Browse files Browse the repository at this point in the history
fix to skip node not in graph because some network cannot be hybridized with some var unused.
  • Loading branch information
chinakook authored Apr 6, 2020
1 parent 41b8fd1 commit 3e8c7be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nnvm/src/core/graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ IndexedGraph::IndexedGraph(const Graph &g) {
// input entries
for (const auto& e : n->inputs) {
auto it = node2index_.find(e.node.get());
CHECK(it != node2index_.end() && it->first == e.node.get());
if (it == node2index_.end() || it->first != e.node.get()) continue;
input_entries_.emplace_back(NodeEntry{it->second, e.index, e.version});
}
inputs_rptr.push_back(input_entries_.size());
Expand Down

0 comments on commit 3e8c7be

Please sign in to comment.