tree_to_graph

Contents

tree_to_graph#

class brainstate.graph.tree_to_graph(tree, /, *, prefix=<class 'brainstate.typing.Missing'>, merge_fn=<function _merge_tree_node>, is_node_leaf=<function _is_tree_node>, is_leaf=<function _is_tree_node>, map_non_graph_nodes=False)[source]#

Convert a pytree of NodeStates back into graph nodes.

Return type:

Any