TensorLy: Tensor Learning in Python
About
Tensors are higher-order extensions of matrices. While matrix methods form the cornerstone of machine learning and data analysis, tensor methods have been gaining increasing traction. However, software support for tensor operations is not on the same footing. In order to bridge this gap, we have developed \emph{TensorLy}, a high-level API for tensor methods and deep tensorized neural networks in Python. TensorLy aims to follow the same standards adopted by the main projects of the Python scientific community, and seamlessly integrates with them. Its BSD license makes it suitable for both academic and commercial applications. TensorLy's backend system allows users to perform computations with NumPy, MXNet, PyTorch, TensorFlow and CuPy. They can be scaled on multiple CPU or GPU machines. In addition, using the deep-learning frameworks as backend allows users to easily design and train deep tensorized neural networks. TensorLy is available at https://github.com/tensorly/tensorly
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Kronecker regression | Random n^2 x d^2 design matrix | Loss2.00e-4 | 118 | |
| Kronecker regression | Synthetic n^2 x d^2 design matrix (test) | Running Time (s)0.0106 | 118 | |
| Low-rank tensor decomposition | Cardiac MRI tensor | Avg Iteration Time (s)1.187 | 64 | |
| Tucker decomposition | Cardiac MRI tensor | Relative Reconstruction Error0.35 | 63 | |
| Tensor Decomposition | COIL-100 | Average Iteration Time (s)2.455 | 48 | |
| Tensor Decomposition | Hyperspectral image tensor | Avg Iteration Time (s)1.873 | 48 | |
| Tensor Reconstruction | COIL-100 1.0 (test) | Relative Reconstruction Error0.349 | 48 | |
| Hyperspectral Tensor Reconstruction | Hyperspectral radiance image tensor (full) | Relative Reconstruction Error0.133 | 47 | |
| CP Decomposition | UBER | Avg Time per ALS Round (s)64.2 | 4 | |
| CP Decomposition | NELL-2 | Average time per ALS round (seconds)759.6 | 4 |