t3_to_ut3#
- t3toolbox.backend.ut3_conversions.t3_to_ut3(x, N=None, n=None, r=None, squash_tails=True)#
def t3_to_ut3( x: typ.Tuple[ typ.Sequence[NDArray], # tucker_cores, len=d, elm_shape=stack_shape+(ni, Ni) typ.Sequence[NDArray], # tt_cores, len=d, elm_shape=stack_shape+(ri, ni, r(i+1)) ], N: int = None, # padded mode dim (default max(Ni)); pass to force a larger pad n: int = None, # padded Tucker rank (default max(tucker_ranks)) r: int = None, # padded TT rank (default max(tt_ranks)) squash_tails: bool = True, ) -> typ.Tuple[ NDArray, # tucker_supercore, shape=(d,)+stack_shape+(n,N) NDArray, # tt_supercore, shape=(d,)+stack_shape+(r,n,r) typ.Tuple[int, ...], # shape = (N0,...,N(d-1)), static int tuple typ.Tuple[NDArray, NDArray], # (tucker_edge_mask, tt_edge_mask), HOST bool, static ]:
Convert a (ragged) TuckerTensorTrain core pair to uniform supercores + shape + masks (nested .data).
Pads each core to common sizes
(n, N)/(r, n, r), stacks thedcores onto a leading axis, and records the real extent as prefix masks.use_jaxis inferred from the input cores for the SUPERCORES; the masks are always numpy (host) structure (docs/contributor/uniform_pytree_composition.md).