Created by: thesps
remove_node
, when the node being removed is an output node, the model outputs need to be reconnected to the input of the removed node.remove_node
, we raise an exception that we cannot handle nodes with multiple outputs (nor inputs). However, even for a node with a single output, that output may be consumed my multiple other nodes. So I've added a loop over nodes connected to that output, reconnecting them to the removed node's input whereas previously only one node would have been reconnectedreplace_node
duplicating that logic, I've modified it to use insert_node
then remove_node
directly.