ut3_weighted_norm ================= .. py:function:: t3toolbox.backend.ut3_linalg.ut3_weighted_norm(x, weights, use_orthogonalization = True) .. code-block:: python def ut3_weighted_norm( x: UT3Data, # (tucker_supercore, tt_supercore, shape, masks) weights: ut3_operations.UT3WeightsData, # (tucker_weight_supercore, tt_weight_supercore, masks) use_orthogonalization: bool = True, # for numerical stability ) -> NDArray: # weighted HS norm, shape=stack_shape Weighted Hilbert-Schmidt norm of a uniform Tucker tensor train -- the norm of the fully-weighted network, ``norm(absorb(x, weights))``. Uniform twin of ``t3_weighted_norm``. The plain norm **squares** the inserted diagonals, so ``weights = 1/sigma`` penalises by ``1/sigma^2``. Absorbing breaks any orthogonality ``x`` had (that is what the weights do), so the orthogonalization here runs on the *weighted* train, as in ragged. Weighting does not mask, but the norm does: the reduction is the existing plain uniform norm, which masks its own input on entry -- so the garbage padding ``absorb`` passes through is zeroed there, where reductions are, not here (``docs/contributor/weighted_internals.md`` ยง2). **Precondition:** ``weights``' masks must equal ``x``'s masks (:py:func:`~t3toolbox.backend.ut3_operations.ut3_weights_consistent`); the frontend enforces it.