Giter Club home page Giter Club logo

Comments (4)

IlyaKisil avatar IlyaKisil commented on May 18, 2024

Hi, @Yolanpera. It seems to me that the last update of tensorly on pypi.org was on the 8th of May 2018. Whereas module mps_decomposition was added sometime in July. So your best option would be to install from the source code available in this repository:

# clone the repository and cd into it
git clone https://github.com/tensorly/tensorly
cd tensorly

# Install it in your environment
pip install .

Then you could do something like

import numpy as np
import tensorly as tl
from tensorly.decomposition import matrix_product_state

tensor = tl.tensor(np.random.random((10, 10, 10)))

factors = matrix_product_state(tensor, rank=(1, 10, 10, 1))

tensor_rec = tl.mps_to_tensor(factors)
rec_error = tl.norm(tensor - tensor_rec, 2)/tl.norm(tensor)

print("="*20)
[print(f.shape) for f in factors]

print("="*20)
print(tensor_rec.shape)

print("="*20)
print(rec_error)

As far as documentation is concerned, you have been looking at the pages related to the stable version of tensorly, which, I assume, corresponds to the latest version of tensorly on pypi.org. In order to see the most recent API reference, you need to open http://tensorly.org/dev instead. By looking at the continuous integration scripts, each time the master branch of tensorly/tensorly successfully passes unit tests, the latest version of the website is deployed to tensorly/tensorly.github.io as well.

from tensorly.

Yolanpera avatar Yolanpera commented on May 18, 2024

Hi,@IlyaKisil Thank you very much!
It works for me!

from tensorly.

JeanKossaifi avatar JeanKossaifi commented on May 18, 2024

I'll update the pypi version.

from tensorly.

JeanKossaifi avatar JeanKossaifi commented on May 18, 2024

Done - you can upgrade to 0.4.3 with pypi or conda.

from tensorly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.