tensorly / tensorly

TensorLy: Tensor Learning in Python.
http://tensorly.org
Other
1.57k stars 289 forks source link

tensorly for sparse pytorch tensor decomposition? #166

Open dvirginz opened 4 years ago

dvirginz commented 4 years ago

I'm a bit lost in this awesome library, and could not find a suitable example, hence not sure if and how to use tensorly for a "simple" SVD decomposition for PyTorch tensors (if possible).

I.e

Given two tensors edge_index of dimension (2,E) represents the X,Y entries of a matrix, and edge_value of dimension (E) represents the values of those entries, am I able to create the sparse SVD decomposition of such matrix using tensorly sparse API?

JeanKossaifi commented 4 years ago

Currently we only support sparse tensors using numpy and the PyData Sparse library. We are planning to add others but currently pytorch's support for sparse tensors is quite minimal.

If you want to use sparse tensors in pytorch it would probably be more efficient to use their builtin datastructure than creating your own.