utv_corewise_inner#
- t3toolbox.backend.utv_operations.utv_corewise_inner(variations_a, variations_b, n_stack)#
def utv_corewise_inner( variations_a: typ.Tuple, # UT3Variations .data: (tkv, ttv, shape, masks), supercore stack = K + C variations_b: typ.Tuple, # UT3Variations .data: same structure as variations_a n_stack: int, # number of leading stack axes (K + C) to keep; 0 -> a single scalar ) -> NDArray: # coordinate inner product, shape = stack_shape[:n_stack] (scalar if n_stack==0)
The raw coordinate (corewise) inner product of two uniform tangents’ variations – mask-applied and stack-keeping; not the Hilbert-Schmidt metric.
The raw-tuple backend twin of
corewise_inner()(which delegates here). Masks both variation supercores once (ufv_apply_variations_masks– so the garbage padding is zeroed, never summed into the dot), then sums the elementwise product over the leading mode indexdand the trailing core axes, keeping the firstn_stackstack axes (one dot per stacked tangent). Passn_stack = len(stack_shape)to keep the wholeK + Cstack, orn_stack = 0to collapse to a single scalar – the unstacked optimizer’s coordinate⟨·,·⟩, the check-free twin the geometries’innerbinds (it equals Hilbert-Schmidt only on an orthonormal, gauged frame). Masking makes it robust to garbage padding, so the reduction needs no clean-padding precondition.- Parameters:
variations_a (t3toolbox.backend.common.typ.Tuple)
variations_b (t3toolbox.backend.common.typ.Tuple)
n_stack (int)
- Return type: