TreefyState#
- class brainstate.TreefyState(type, value, **metadata)[source]#
The state as a pytree.
- copy()[source]#
Copy the state reference.
- Return type:
TreefyState[TypeVar(A)]
- replace(value)[source]#
Replace the value of the state reference.
- Return type:
TreefyState[TypeVar(B)]