tltorch
.ComplexTTTensor¶
- class tltorch.ComplexTTTensor(*args, **kwargs)[source]¶
Complex TT Factorization
Methods
new
(shape[, rank, fixed_rank_modes, device, ...])Main way to create a factorized tensor
- classmethod new(shape, rank='same', fixed_rank_modes=None, device=None, dtype=torch.complex64, **kwargs)[source]¶
Main way to create a factorized tensor
- Parameters:
- shapetuple[int]
shape of the factorized tensor to create
- rankint, ‘same’ or float, default is ‘same’
rank of the decomposition
- factorization{‘CP’, ‘TT’, ‘Tucker’}, optional
Tensor factorization to use to decompose the tensor, by default ‘Tucker’
- Returns:
- TensorFactorization
Tensor in Factorized form.
- Raises:
- ValueError
If the factorization given does not exist.
Examples
Create a Tucker tensor of shape (3, 4, 2) with half the parameters as a dense tensor would:
>>> tucker_tensor = FactorizedTensor.new((3, 4, 2)), rank=0.5, factorization='tucker')