t3_core_shapes#

t3toolbox.backend.t3_operations.t3_core_shapes(shape, tucker_ranks, tt_ranks, stack_shape=())#
def t3_core_shapes(
        shape:        typ.Sequence[int],       # len=d, the tensor mode sizes (N0,...,N(d-1))
        tucker_ranks: typ.Sequence[int],       # len=d
        tt_ranks:     typ.Sequence[int],       # len=d+1
        stack_shape:  typ.Sequence[int] = (),  # leading batch axes
) -> typ.Tuple[
    typ.Tuple[int, ...],  # tucker_core_shapes. len=d, each = stack_shape+(ni,Ni)
    typ.Tuple[int, ...],  # tt_core_shapes.     len=d, each = stack_shape+(rLi,ni,rR(i+1))
]:

Determines the shapes of the T3 cores based on the ranks.

Parameters:
  • shape (t3toolbox.backend.common.typ.Sequence[int])

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

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

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

Return type:

t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Tuple[int, Ellipsis], t3toolbox.backend.common.typ.Tuple[int, Ellipsis]]