UT3Weights.from_t3weights#

static t3toolbox.uniform_tucker_tensor_train.UT3Weights.from_t3weights(weights, n=None, r=None)#
def from_t3weights(
        weights: 't3.T3Weights',
        n: Optional[int] = None,   # padded Tucker rank (default max rank); pass to match the train's pad
        r: Optional[int] = None,   # padded TT rank     (default max rank)
) -> 'UT3Weights':

Pack a ragged T3Weights into a uniform one.

Pass n/r to match the padding of the UniformTuckerTensorTrain these weights will pair with (e.g. n=ux.n, r=ux.r); the defaults pad tightly to the weights’ own max rank, which only matches a tightly-padded train.

Parameters:
  • weights (T3Weights)

  • n (Optional[int])

  • r (Optional[int])

Return type:

UT3Weights