OSTL#
- class braintrace.OSTL(model, regime='with-H', name=None, **kwargs)[source]#
Factory returning the appropriate VJP algorithm for the selected regime.
Using a factory (not a subclass with branching) lets each regime inherit everything — compile_graph, update, reset_state, get_etrace_of — from the existing tested algorithm classes without duplication.
- Parameters:
model (
Module)regime (
str) – ‘with-H’ uses D_RTRL-shape traces (per-parameter, O(P·H)). Exact for single-recurrent-layer networks. ‘without-H’ drops the temporal term, equivalent to pp_prop with negligible decay (feedforward SNN).**kwargs (forwarded to the base algorithm constructor.)