anko-intel commented on a change in pull request #20821:
URL: https://github.com/apache/incubator-mxnet/pull/20821#discussion_r787689923
##########
File path: src/operator/subgraph/build_subgraph.cc
##########
@@ -749,6 +749,17 @@ void CreateSubgraphNode(nnvm::Graph* g,
for (BiDirectedNode* dest_node : subgraph_nodes) {
sn->outputs.erase(dest_node->node);
}
+ }
+ }
+
+ // Set outputs according to current inputs
+ for (size_t i = 0; i < n->inputs.size(); ++i) {
+ auto& e = n->inputs[i];
+ // update input entries' source simple nodes' outputs map
+ nnvm::Node* node = e.node.get();
+ if (indexed_graph.exist(node)) {
+ const auto nid = indexed_graph.node_id(node);
+ BiDirectedNode* sn = simple_nodes[nid].get();
Review comment:
Yes, ouput is add in line 763 using `sn`.
The difference between previous version is that first all nodes which should
be removed are removed in line 750
and later all node which ssould be added are added in line 763.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]