Skip to main content

Tensor-Train decomposition in pytorch.

Project description

torchTT

Tensor-Train decomposition in pytorch

Tensor-Train decomposition package written in Python on top of pytorch. Supports GPU acceleration and automatic differentiation. It also contains routines for solving linear systems in the TT format and performing adaptive cross approximation (the AMEN solver/cross interpolation is inspired form the MATLAB TT-Toolbox). Some routines are implemented in C++ for an increased execution speed.

Installation

Requirements

Following requirements are needed:

The GPU (if available) version of pytorch is recommended to be installed. Read the official installation guide for further info.

Using pip

You can install the package using the pip command:

pip install torchTT

The latest github version can be installed using:

pip install git+https://github.com/ion-g-ion/torchTT

One can also clone the repository and manually install the package:

git clone https://github.com/ion-g-ion/torchTT
cd torchTT
python setup.py install

Using conda

TODO

Components

The main modules/submodules that can be accessed after importing torchtt are briefly desctibed in the following table. Detailed description can be found here.

Component Description
torchtt Basic TT class and basic linear algebra functions.
torchtt.solvers Implementation of the AMEN solver.
torchtt.grad Wrapper for automatic differentiation.
torchtt.manifold Riemannian gradient and projection onto manifolds of tensors with fixed TT rank.
torchtt.nn Basic TT neural network layer.
torchtt.interpolate Cross approximation routines.

Tests

The directory tests/ from the root folder contains all the unittests. To run them use the command:

pytest tests/

Documentation and examples

The documentation can be found here. Following example scripts (as well as python notebooks) are also provied provided as part of the documentation:

The documentation is generated using shpinx with:

make html

after installing the packages

pip install sphinx sphinx_rtd_theme

Author

Ion Gabriel Ion, e-mail: ion.ion.gabriel@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torchtt-0.3.tar.gz (524.6 kB view details)

Uploaded Source

File details

Details for the file torchtt-0.3.tar.gz.

File metadata

  • Download URL: torchtt-0.3.tar.gz
  • Upload date:
  • Size: 524.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for torchtt-0.3.tar.gz
Algorithm Hash digest
SHA256 f317f57eec5b2eda6af11f7eed8bbf97b18bb1fac8f00f1d22c97703fc1bd4d9
MD5 69a1873e082955392722f382fdab0b1e
BLAKE2b-256 9efd7020c0128be303812dfc96426b6b295706ebd3da948b0464803be09e3fa9

See more details on using hashes here.

Provenance

The following attestation bundles were made for torchtt-0.3.tar.gz:

Publisher: publish.yml on ion-g-ion/torchTT

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page