treefy_split

Contents

treefy_split#

class brainstate.graph.treefy_split(node, *filters)#

Split a graph node into a GraphDef and one or more state NestedDicts.

If no filters are given, returns (graphdef, state). With filters, returns (graphdef, state1, state2, …) split by filter predicates.