t3toolbox.OLD_uniform ===================== .. py:module:: t3toolbox.OLD_uniform Attributes ---------- .. autoapisummary:: t3toolbox.OLD_uniform.UniformTuckerTensorTrain t3toolbox.OLD_uniform.UniformEdgeWeights t3toolbox.OLD_uniform.UniformT3Base t3toolbox.OLD_uniform.UniformT3Variation t3toolbox.OLD_uniform.UniformBVEdgeWeights t3toolbox.OLD_uniform.UniformBVStructure Functions --------- .. toctree:: :hidden: /autoapi/t3toolbox/OLD_uniform/get_uniform_base_structure /autoapi/t3toolbox/OLD_uniform/get_uniform_base_hole_shapes /autoapi/t3toolbox/OLD_uniform/check_ut3 /autoapi/t3toolbox/OLD_uniform/get_uniform_structure /autoapi/t3toolbox/OLD_uniform/get_original_structure /autoapi/t3toolbox/OLD_uniform/apply_masks /autoapi/t3toolbox/OLD_uniform/apply_masks_to_base /autoapi/t3toolbox/OLD_uniform/apply_masks_to_variation /autoapi/t3toolbox/OLD_uniform/uniform_squash_tails /autoapi/t3toolbox/OLD_uniform/pack_tensors /autoapi/t3toolbox/OLD_uniform/unpack /autoapi/t3toolbox/OLD_uniform/make_uniform_masks /autoapi/t3toolbox/OLD_uniform/uniform_randn /autoapi/t3toolbox/OLD_uniform/uniform_zeros /autoapi/t3toolbox/OLD_uniform/t3_to_ut3 /autoapi/t3toolbox/OLD_uniform/ut3_to_t3 /autoapi/t3toolbox/OLD_uniform/bv_to_ubv /autoapi/t3toolbox/OLD_uniform/ut3_to_dense /autoapi/t3toolbox/OLD_uniform/are_ut3_ranks_minimal /autoapi/t3toolbox/OLD_uniform/ut3_entry /autoapi/t3toolbox/OLD_uniform/ut3_add /autoapi/t3toolbox/OLD_uniform/ut3_scale /autoapi/t3toolbox/OLD_uniform/ut3_neg /autoapi/t3toolbox/OLD_uniform/ut3_sub .. autoapisummary:: t3toolbox.OLD_uniform.get_uniform_base_structure t3toolbox.OLD_uniform.get_uniform_base_hole_shapes t3toolbox.OLD_uniform.check_ut3 t3toolbox.OLD_uniform.get_uniform_structure t3toolbox.OLD_uniform.get_original_structure t3toolbox.OLD_uniform.apply_masks t3toolbox.OLD_uniform.apply_masks_to_base t3toolbox.OLD_uniform.apply_masks_to_variation t3toolbox.OLD_uniform.uniform_squash_tails t3toolbox.OLD_uniform.pack_tensors t3toolbox.OLD_uniform.unpack t3toolbox.OLD_uniform.make_uniform_masks t3toolbox.OLD_uniform.uniform_randn t3toolbox.OLD_uniform.uniform_zeros t3toolbox.OLD_uniform.t3_to_ut3 t3toolbox.OLD_uniform.ut3_to_t3 t3toolbox.OLD_uniform.bv_to_ubv t3toolbox.OLD_uniform.ut3_to_dense t3toolbox.OLD_uniform.are_ut3_ranks_minimal t3toolbox.OLD_uniform.ut3_entry t3toolbox.OLD_uniform.ut3_add t3toolbox.OLD_uniform.ut3_scale t3toolbox.OLD_uniform.ut3_neg t3toolbox.OLD_uniform.ut3_sub Module Contents --------------- .. py:data:: UniformTuckerTensorTrain Tuple containing supercores of a Uniform Tucker tensor train Uniform Tucker tensor trains are created by padding a Tucker tensor train so that the ranks are uniform, then stacking the TT cores and Tucker cores into "supercores", which have one more dimension. Padding may be tracked with boolean mask arrays associated with the edges. .. seealso:: UniformTuckerTensorTrainMasks **Components** - tucker_supercore: NDArray. shape=(d, n, N). Stacked padded tucker cores - tt_supercore: NDArray. shape=(d, r, n, r). Stacked padded TT-cores Here: - d = num_cores - N = padded_shape - n = padded_tucker_rank - r = padded_tt_rank .. rubric:: 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), (1,3,2,1))) >>> cores, masks = ut3.t3_to_ut3(x) >>> print(ut3.get_padded_structure(cores)) (3, 16, 6, 3) >>> print(ut3.original_structure(masks)) ((14, 15, 16), (4, 6, 5), (1, 3, 2, 1)) .. py:data:: UniformEdgeWeights Tuple containing edge masks for a Uniform Tucker tensor train. Often used for masking. .. seealso:: UniformTuckerTensorTrainCores **Components** - shape_masks: NDArray. shape=(d,N). Weights for edges between Tucker cores and exterior of tensor - tucker_masks: NDArray. shape=(d,n). Weights for edges between Tucker cores and adjacent TT-cores - tt_masks: NDArray. shape=(d+1,r). Weights for edges between adjacent TT-cores Here: - d = num_cores - N = padded_shape - n = padded_tucker_rank - r = padded_tt_rank .. rubric:: 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), (1,3,2,1))) >>> cores, masks = ut3.t3_to_ut3(x) >>> print(ut3.get_padded_structure(cores)) (3, 16, 6, 3) >>> print(ut3.original_structure(masks)) ((14, 15, 16), (4, 6, 5), (1, 3, 2, 1)) .. py:data:: UniformT3Base Base supercores for base-variation representation of Uniform Tucker tensor train. The components of T3Base are the "base cores": - up_tucker_cores: NDArray, shape=(d, nU, N), up orthogonal elements - left_tt_cores: NDArray, shape=(d, r, nU, r), left orthogonal elements - right_tt_cores: NDArray, shape=(d, r, nU, r), right orthogonal elements - outer_tt_cores: NDArray, shape=(d, r, nO, r), outer orthogonal elements .. seealso:: :py:obj:`t3toolbox.tucker_tensor_train.T3Base`, :py:obj:`UniformT3Variation` .. py:data:: UniformT3Variation Variation supercores for base-variation representation of Uniform Tucker tensor train. *Components* - var_tucker_supercore: NDArray, shape=(d,nO,N) - var_tt_supercore: NDArray, shape=(d,r,nU,r) The variation components should fit in the "holes" of a UniformT3Variation. .. seealso:: :py:obj:`t3toolbox.tucker_tensor_train.T3Variation`, :py:obj:`UniformT3Base` .. py:data:: UniformBVEdgeWeights Edge weights for base-variation format. *Components* - shape_weights: NDArray, shape=(d,Ni) - up_tucker_weights: NDArray, shape=(d,nUi) - outer_tucker_weights: NDArray, shape=(d,nOi) - left_tt_weights: NDArray, shape=(d,rLi) - right_tt_weights: NDArray, shape=(d,rRi) .. seealso:: :py:obj:`t3tools.tucker_tensor_train.EdgeWeights`, :py:obj:`t3tools.basis_coordinates_format.BVEdgeWeights`, :py:obj:`UniformT3Variation`, :py:obj:`UniformT3Base` .. py:data:: UniformBVStructure Shape and rank structure of a uniform base-variation T3 representation. *Components* - d: int, number of tensor indices - N: size of external indices - nU: up tucker rank - nO: outer tucker rank - rL: left TT rank - rR: right TT rank .. seealso:: :py:obj:`UniformT3Base`, :py:obj:`UniformT3Variation`