Comments (4)
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.
Hi,@IlyaKisil Thank you very much!
It works for me!
from tensorly.
I'll update the pypi version.
from tensorly.
Done - you can upgrade to 0.4.3 with pypi or conda.
from tensorly.
Related Issues (20)
- All nan in matrix come from non negative tucker decomposition HOT 2
- Init mode == "random" does not return the correct shape in initialize_tucker HOT 3
- It appears that partial_unfold works using sparse tensors, but it is not clear in the documentation
- Better random init of factorized tensors HOT 1
- svd_interface will throw an error if the number of rows of the matrix is smaller than it's columns HOT 1
- numpy.core._exceptions._ArrayMemoryError HOT 2
- Is there any t-product implementation code in tensorly?Thanks HOT 1
- More descriptive message when random PARAFAC2 rank is infeasible given shape HOT 1
- AssertionError: `tensorly.tt_tensor.validate_tt_rank` test HOT 1
- Randomised_CP function throws a Singular Matrix error HOT 2
- Tensor Conversion in TensorLy Does Not Preserve PyTorch Tensor dtype and device Attributes
- PARAFAC2 for missing data HOT 1
- Panel Dataset Time, Company, Feature HOT 1
- No attribute "device" when using Numpy backend HOT 3
- Remove MXNet from doc
- Parafac\parafac2 projection HOT 1
- Tensorly support float16/int8
- OOM issue HOT 6
- Question: CP decomposition of symmetric tensor with repeating factor matrix HOT 1
- How can I apply activation to each factor matrix? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorly.