tltorch
.ComplexDenseTensor¶
- class tltorch.ComplexDenseTensor(*args, **kwargs)[source]¶
Complex Dense Factorization
Methods
new
(shape[, rank, device, dtype])Main way to create a factorized tensor
- classmethod new(shape, rank=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')