Skip to content
Snippets Groups Projects
Commit 71b6f1c9 authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

fix : if Flatten was the root node then the graph has no root node anymore after node deletion

parent dc7af581
No related branches found
No related tags found
2 merge requests!105version 0.2.0,!91Feat/operator global average pooling
...@@ -912,6 +912,13 @@ bool Aidge::GraphView::replace(const std::shared_ptr<GraphView>& oldG, const std ...@@ -912,6 +912,13 @@ bool Aidge::GraphView::replace(const std::shared_ptr<GraphView>& oldG, const std
for (std::size_t i = 0; i < oldOI.size(); ++i) { for (std::size_t i = 0; i < oldOI.size(); ++i) {
if (inputParents[i].first) if (inputParents[i].first)
inputParents[i].first -> addChild(outputChildren[i].first, inputParents[i].second, outputChildren[i].second); inputParents[i].first -> addChild(outputChildren[i].first, inputParents[i].second, outputChildren[i].second);
if (inputParents[i].first) {
inputParents[i].first -> addChild(outputChildren[i].first, inputParents[i].second, outputChildren[i].second);
} else {
for (auto & view : commonGraphViews){
view->setRootNode( outputChildren[i].first);
}
}
} }
} }
else if ((oldOI.size() == 1) && (inputParents[0].first)) { else if ((oldOI.size() == 1) && (inputParents[0].first)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment