ut3_weighted_norm#
- t3toolbox.backend.ut3_linalg.ut3_weighted_norm(x, weights, use_orthogonalization=True)#
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 oft3_weighted_norm.The plain norm squares the inserted diagonals, so
weights = 1/sigmapenalises by1/sigma^2. Absorbing breaks any orthogonalityxhad (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
absorbpasses through is zeroed there, where reductions are, not here (docs/contributor/weighted_internals.md§2).Precondition:
weights’ masks must equalx’s masks (ut3_weights_consistent()); the frontend enforces it.- Parameters:
x (UT3Data)
weights (t3toolbox.backend.ut3_operations.UT3WeightsData)
use_orthogonalization (bool)
- Return type: