tltorch.ComplexTuckerTensor

class tltorch.ComplexTuckerTensor(*args, **kwargs)[source]

Complex Tucker 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')