diff --git a/nnvm/src/core/graph.cc b/nnvm/src/core/graph.cc index fd5b64f4777d..e5042802906c 100644 --- a/nnvm/src/core/graph.cc +++ b/nnvm/src/core/graph.cc @@ -96,7 +96,7 @@ IndexedGraph::IndexedGraph(const Graph& g) { // input entries for (const auto& e : n->inputs) { auto it = node2index_.find(e.node.get()); - if (it == node2index_.end() || it->first != e.node.get()) continue; + CHECK(it != node2index_.end() && it->first == e.node.get()); input_entries_.emplace_back(NodeEntry{it->second, e.index, e.version}); } inputs_rptr.push_back(input_entries_.size());