sumsq_over_samples#
- t3toolbox.backend.fitting.sumsq_over_samples(out, n_w)#
def sumsq_over_samples( out: NDArray, # scalar-output forward/residual, shape W+C (apply / entries) n_w: int, # number of leading sample-stack (W) axes ) -> NDArray: # sum of squares over W, keeping the frame stack C
The
‖·‖²reduction for the scalar-output (apply / entries) kinds: sumout**2over the leadingn_wsample axes, keeping the frame stackC. Used for both the objectivec = ½‖r‖²and the model’s quadratic term½‖𝒥 Π p‖².