Unverified Commit 3e8c7beb by chinakook Committed by GitHub

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.
parent 41b8fd1e
...@@ -98,7 +98,7 @@ IndexedGraph::IndexedGraph(const Graph &g) { ...@@ -98,7 +98,7 @@ IndexedGraph::IndexedGraph(const Graph &g) {
// input entries // input entries
for (const auto& e : n->inputs) { for (const auto& e : n->inputs) {
auto it = node2index_.find(e.node.get()); 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}); input_entries_.emplace_back(NodeEntry{it->second, e.index, e.version});
} }
inputs_rptr.push_back(input_entries_.size()); inputs_rptr.push_back(input_entries_.size());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment