From 3e8c7beb9248606fe6767ef455adb2ccb8f9368b Mon Sep 17 00:00:00 2001 From: chinakook Date: Mon, 6 Apr 2020 23:42:01 +0800 Subject: [PATCH] fix to skip node not in graph. (#5238) fix to skip node not in graph because some network cannot be hybridized with some var unused. --- nnvm/src/core/graph.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nnvm/src/core/graph.cc b/nnvm/src/core/graph.cc index 8930e49..c3ae60e 100644 --- a/nnvm/src/core/graph.cc +++ b/nnvm/src/core/graph.cc @@ -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()); -- 2.7.4