- brainpy.nn.operations.merge(node, *other_nodes, inplace=False, name=None, need_detect_cycle=True)#
Nodeinstances contained in the network to merge will be gathered in a single network, along with all previously defined connections between them, if they exists.
You can also perform this operation using the
network = (node1 >> node2) & (node1 >> node3))
This is equivalent to:
network = merge((node1 >> node2), (node1 >> node3))
The inplace operator can also be used:
network &= other_network
inplace (bool, default to False) – If True, then will update node inplace. If node is not a Network instance, this parameter will causes the function to raise an error.
name (str, optional) – Name of the resulting Network.
need_detect_cycle (bool) – Whether need to detect the cycle defined in the graph.
- Return type