uniform_fitting#
Uniform-layer fitting seams: the GeometryOps factories (and, later, the SamplingKind builders)
that let the geometry-generic optimizers (t3toolbox.backend.optimizers) run on uniform
supercores. The uniform twin of t3toolbox.backend.fitting – optimizers-on-uniform slice U2.
The optimizers are written against three pluggable seams (GeometryOps, SamplingKind,
corewise) and never mention a layer; supplying uniform implementations of the seams runs the SAME
algorithm bodies on uniform data. This module supplies the geometry half.
The mask-holding recipe (docs/uniform_backend_jit_recipe.md). A uniform .data tuple carries host-
numpy masks that cannot be jit-traced. So – unlike the stateless ragged MANIFOLD / COREWISE
singletons – the uniform geometry is a factory that captures the loop-invariant masks (fixed at
fixed rank) and closes over them; the optimizer traces only the supercores. The convention throughout:
the optimizer’s point
xis a bare supercore pair(tucker_sc, tt_sc)(masks closed over);a tangent is a bare variation supercore pair
(tucker_var_sc, tt_var_sc);a frame is the full frame
.data(framereturns it,project/retractconsume it).
Each closure re-attaches the held shape + masks at the boundary (building the full .data tuples
the utv_operations primitives expect) and strips them back to a bare pair on output, so
corewise.* and GeometryOps.inner see only supercores. Under jit the re-derived frame masks
constant-fold to device constants (the “1 compile” behaviour of the recipe).
Functions#
|
The uniform manifold |
|
The uniform corewise |
|
Dispatch to |
|
The uniform apply |
|
The uniform entries |
|
The uniform probe |
|
Dispatch to the uniform |
|
The uniform apply-derivatives |
|
The uniform entries-derivatives |
|
The uniform probe-derivatives |
|
Dispatch to the uniform derivative sampling kind by name. |
|
Pack the loop-invariant mode-vectors of |
|
Pack the observed data (or a residual of the same shape) once: probe kinds -> a packed |
|
Reduce |
|
Assemble a fully-packed uniform least-squares |