stack_traces#
- hybrid_aif.stack_traces(traces)[source]#
Pad variable-length traces to one
Tand stack them: the batch convention (R7).Each trace is
(observations, actions, present_or_None), keyed asreplay()takes them, with leading axes of one length. Returns(observations, actions, present, valid)with a leading batch axis: padding rows are zeros, absent (presentFalse) and invalid (validFalse). Replay a batch withjax.vmap(lambda o, a, m, v: replay(system, params, o, a, present=m, valid=v)).