Deterministic#
- class hybrid_aif.Deterministic[source]#
Bases:
ModuleA deterministic node: a pure map, optionally with trainable parameters.
gru()builds the RSSM carry case. A recurrent map takes its carry as an argument and returns the next one; nothing is stashed on the module. The gradient statistic arrives from whatever consumes the node’s output, andabsorb()applies it through the shared gradient path.Design: docs/design/system.md (Factors)
- map: object#
Any pure callable pytree: an
equinox.Modulewhose array leaves are the node’s parameters, or a bare function with none.
- rule: str = 'carry'#
The per-node message treatment, a static string from
_RULES; only"carry"(computed forward, never inferred) is built.
- classmethod gru(
- deter_dim,
- input_dims,
- *,
- key,
- hidden,
- activation='silu',
- norm=True,
- frozen=False,
- init='default',
An RSSM’s carry node: a
GRUCellover(deter, *inputs), withinput_dimsthe widths of the non-carry inputs — for an RSSM(num_vars·num_classes, action_dim), the previous flattened one-hotstochand the action.initis the cell’s.
- absorb(stats, opt_state, lr=1.0, decay=1.0)[source]#
One optax step from a gradient pytree:
(node, opt_state).statsis∇of the consumer’s loss with respect to this node.
- __init__(map, rule='carry', frozen=False)#