fv_padded_frame#

t3toolbox.backend.padded_frames.fv_padded_frame(old_frame, tucker_ranks, tt_ranks, sharing=None, seed=ZERO_FRAME_SEED)#
def fv_padded_frame(
        old_frame:     FrameData,                          # the old frame, stack C (fv_empty_frame for the zero tensor)
        tucker_ranks:  typ.Sequence[int],                  # len=d, target Tucker ranks (stores >= the old frame's)
        tt_ranks:      typ.Sequence[int],                  # len=d+1, target TT ranks (boundary 1)

        sharing:       typ.Optional[typ.Sequence] = None,  # len=d group labels; None = unshared
        seed:          int = ZERO_FRAME_SEED,              # the keyed seed streams of the completions
) -> typ.Tuple[                 # (nD, nU, rL, rR) = compute_orthogonal_representation_ranks(shape, tucker_ranks, tt_ranks)
    typ.Tuple[NDArray, ...],    # down.  len=d, elm_shape=C+(nDi, Ni): the old rows bitwise, then the seeded completion
    typ.Tuple[NDArray, ...],    # up.    len=d, elm_shape=C+(rLi, nUi, rR(i+1)): the old block bitwise, then seeded
    typ.Tuple[NDArray, ...],    # left.  len=d, elm_shape=C+(rLi, nDi, rL(i+1)); left[d-1] = the old carrier, zero-padded
    typ.Tuple[NDArray, ...],    # right. len=d, elm_shape=C+(rRi, nDi, rR(i+1)); right[0] = the old carrier, zero-padded
]:

The hint-free padded frame: the old frame in the leading slots, the new slots by the hint-free convention.

Parameters:
  • old_frame (FrameData)

  • tucker_ranks (t3toolbox.backend.common.typ.Sequence[int])

  • tt_ranks (t3toolbox.backend.common.typ.Sequence[int])

  • sharing (t3toolbox.backend.common.typ.Optional[t3toolbox.backend.common.typ.Sequence])

  • seed (int)

Return type:

t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Tuple[NDArray, …], t3toolbox.backend.common.typ.Tuple[NDArray, …], t3toolbox.backend.common.typ.Tuple[NDArray, …], t3toolbox.backend.common.typ.Tuple[NDArray, …]]