t3toolbox.OLD_uniform.ut3_to_dense#

t3toolbox.OLD_uniform.ut3_to_dense(cores: UniformTuckerTensorTrain, masks: UniformEdgeWeights, use_jax: bool = False) NDArray#

Construct dense tensor represented by uniform Tucker tensor train

Parameters:
  • cores (UniformTuckerTensorTrainCores,) – Cores for the uniform Tucker tensor train

  • masks (UniformTuckerTensorTrainMasks,) – Masks for the uniform Tucker tensor train

Returns:

The dense tensor represented by uniform_x

Return type:

NDArray

Examples

>>> import numpy as np
>>> import t3toolbox.tucker_tensor_train as t3
>>> import t3toolbox.uniform_tucker_tensor_train as ut3
>>> x = t3.t3_corewise_randn(((14,15,16), (4,6,5), (2,3,2,2)))
>>> cores, masks = ut3.t3_to_ut3(x)
>>> x_dense = t3.t3_to_dense(x)
>>> x_dense2 = ut3.ut3_to_dense(cores, masks)
>>> print(np.linalg.norm(x_dense - x_dense2))
0.0