pyjuice.merge
- pyjuice.merge(ns1: CircuitNodes, *args) CircuitNodes
Merge nodes with identical region node together.
- Parameters:
ns1 (CircuitNodes) – the first PC node
args (CircuitNodes) – the remaining PC nodes
- Example::
>>> i00 = inputs(0, num_node_blocks, dists.Categorical(num_cats = 5)) >>> i01 = inputs(0, num_node_blocks, dists.Categorical(num_cats = 5)) >>> i10 = inputs(1, num_node_blocks, dists.Categorical(num_cats = 5)) >>> i11 = inputs(1, num_node_blocks, dists.Categorical(num_cats = 5))
>>> m00 = multiply(i00, i10) >>> m01 = multiply(i01, i11)
>>> n0 = summate(m00, num_node_blocks = num_node_blocks) >>> n1 = summate(m01, num_node_blocks = num_node_blocks)
>>> n_new = pyjuice.merge(n0, n1)