treefy_merge

Contents

treefy_merge#

class brainstate.graph.treefy_merge(graphdef, *state_mappings)#

Reconstruct a node from a GraphDef and one or more state mappings.

Parameters:
  • graphdef (GraphDef) – The static structure.

  • *state_mappings (NestedDict) – One or more state mappings (e.g. the partitions from treefy_split()); they are merged before reconstruction.

Returns:

The reconstructed node.

Return type:

Any