t3_tucker_weights_shared#

t3toolbox.backend.sharing.t3_tucker_weights_shared(weights, sharing, rtol=1e-09)#
def t3_tucker_weights_shared(
        weights:    typ.Tuple[
            typ.Sequence[NDArray],  # tucker_weights. len=d,   elm_shape=stack_shape+(ni,)
            typ.Sequence[NDArray],  # tt_weights.     len=d+1, elm_shape=stack_shape+(ri,)
        ],
        sharing:    typ.Sequence,   # len=d, static; one hashable group label per mode
        rtol:       float = 1e-9,   # relative tolerance on the Tucker-weight deviation
) -> NDArray:  # bool array, shape = stack_shape (scalar/0-d when unstacked)

True (per stack element) where the Tucker weights are equal within every sharing group – the boolean form of t3_tucker_weights_sharing_residual(). A non-enforcing checker: absorbing group-UNEQUAL weights into a tied T3 is legitimate (it just unties the result – repair with t3_tie_tucker_factors() or re-enter with share if wanted).

Parameters:
  • weights (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])

  • sharing (t3toolbox.backend.common.typ.Sequence)

  • rtol (float)

Return type:

NDArray