tv_precompute_apply_frame_sweep#
- t3toolbox.backend.apply.tv_precompute_apply_frame_sweep(frame, ww)#
def tv_precompute_apply_frame_sweep( frame: typ.Tuple[ typ.Sequence[NDArray], # up_tucker_cores U. len=d typ.Sequence[NDArray], # down_tt_cores O. len=d typ.Sequence[NDArray], # left_tt_cores P. len=d typ.Sequence[NDArray], # right_tt_cores Q. len=d ], # frame order = T3Frame.data = (up, down, left, right) ww: typ.Sequence[NDArray], # apply vectors, len=d, elm_shape=W+(Ni,) ) -> typ.Tuple[ typ.Sequence[NDArray], # xis. len=d, elm_shape=W+C+(nUi,) typ.Sequence[NDArray], # mus. len=d, elm_shape=W+C+(rLi,) ]: # lean frame sweep -- (xis, mus) only
The all-modes apply frame sweep (lean): the frame edge variables
(xi-hat, mu-hat)that depend only on the frame frame and the apply vectorsww– NOT on the tangent or residual. Computing them is the expensive,W-scaled part of the apply Jacobian; precomputed once per frame and reused across everyJ/Jᵀof an inner solve (the reuse hook forfitting.py).Lean ``(xis, mus)`` only (not the right
nu/ downetasweeps): the all-modes apply forward AND its adjoint-state transpose use only(xi, mu)– the transpose recomputes the right context assigma_hatfrom the residual rather than storingnu/eta, halving theW-scaling memory (apply on the manifold, §6.2.2 of Alger et al. (2026)). Probe, which leaves a mode free, needs the full sweep –tv_precompute_probe_frame_sweep().See also
tv_apply_jacobian_from_sweep,tv_apply_transpose_from_sweep,tv_precompute_probe_frame_sweep