{ "info": { "author": "Jean Kossaifi", "author_email": "jean.kossaifi@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering" ], "description": ".. image:: https://badge.fury.io/py/tensorly.svg\n :target: https://badge.fury.io/py/tensorly\n\n.. image:: https://anaconda.org/tensorly/tensorly/badges/version.svg \n :target: https://anaconda.org/tensorly/tensorly\n\n.. image:: https://travis-ci.org/tensorly/tensorly.svg?branch=master\n :target: https://travis-ci.org/tensorly/tensorly\n\n.. image:: https://coveralls.io/repos/github/tensorly/tensorly/badge.svg?branch=master\n :target: https://coveralls.io/github/tensorly/tensorly?branch=master\n \n.. image:: https://badges.gitter.im/tensorly/tensorly.svg\n :target: https://gitter.im/tensorly/tensorly?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge\n\n\n========\nTensorLy\n========\n \n\nTensorLy is a Python library that aims at making tensor learning simple and accessible. It allows to easily perform tensor decomposition, tensor learning and tensor algebra. Its backend system allows to seamlessly perform computation with NumPy, MXNet, PyTorch, TensorFlow or CuPy, and run methods at scale on CPU or GPU.\n\n- **Website:** http://tensorly.org\n- **Source-code:** https://github.com/tensorly/tensorly\n- **Jupyter Notebooks:** https://github.com/JeanKossaifi/tensorly-notebooks\n\n----------------------------\n\nInstalling TensorLy\n===================\n\nThe only pre-requisite is to have **Python 3** installed. The easiest way is via the `Anaconda distribution `_.\n\n+-------------------------------------------+---------------------------------------------------+\n| \u00a0 \u00a0 **With pip** (recommended) | \u00a0 \u00a0 \u00a0 \u00a0 **With conda** |\n+-------------------------------------------+---------------------------------------------------+\n| | |\n| .. code:: | .. code:: |\n| | |\n| pip install -U tensorly | conda install -c tensorly tensorly |\n| | |\n| | |\n+-------------------------------------------+---------------------------------------------------+\n| **Development (from git)** |\n+-------------------------------------------+---------------------------------------------------+\n| |\n| .. code:: |\n| |\n| # clone the repository |\n| git clone https://github.com/tensorly/tensorly |\n| cd tensorly |\n| # Install in editable mode with `-e` or, equivalently, `--editable` |\n| pip install -e . |\n| |\n+-----------------------------------------------------------------------------------------------+ \n \n**Note:** TensorLy depends on NumPy by default. If you want to use the MXNet or PyTorch backends, you will need to install these packages separately.\n\nFor detailed instruction, please see the `documentation `_.\n\n--------------------------\n\nRunning the tests\n=================\n\nTesting and documentation are an essential part of this package and all functions come with uni-tests and documentation.\n\nThe tests are ran using the `pytest` package (though you can also use `nose`). \nFirst install `pytest`::\n\n pip install pytest\n \nThen to run the test, simply run, in the terminal:\n\n.. code::\n\n pytest -v tensorly\n \nAlternatively, you can specify for which backend you wish to run the tests:\n\n.. code::\n \n TENSORLY_BACKEND='numpy' pytest -v tensorly\n \n------------------\n\nQuickstart\n==========\n\nCreate a small third order tensor of size 3 x 4 x 2 and perform simple operations on it:\n\n.. code:: python\n\n import tensorly as tl\n import numpy as np\n\n\n tensor = tl.tensor(np.arange(24).reshape((3, 4, 2)), dtype=tl.float64)\n unfolded = tl.unfold(tensor, mode=0)\n tl.fold(unfolded, mode=0, shape=tensor.shape)\n\n\nApplying tensor decomposition is easy:\n\n.. code:: python\n\n from tensorly.decomposition import tucker\n # Apply Tucker decomposition \n tucker_tensor = tucker(tensor, rank=[2, 2, 2])\n # Reconstruct the full tensor from the decomposed form\n tl.tucker_to_tensor(tucker_tensor)\n\nYou can change the backend to perform computation with a different framework. Note that using MXNet, PyTorch, TensorFlow or CuPy requires to have installed them first. For instance, after setting the backend to PyTorch, all the computation is done by PyTorch, and tensors can be created on GPU:\n\n.. code:: python\n\n tl.set_backend('pytorch') # Or 'mxnet', 'numpy', 'tensorflow' or 'cupy'\n tensor = tl.tensor(np.arange(24).reshape((3, 4, 2)), device='cuda:0')\n type(tensor) # torch.Tensor\n\nFor more information on getting started, checkout the `user-guide `_ and for a detailed reference of the functions and their documentation, refer to\nthe `API `_ \n\nIf you see a bug, open an `issue `_, or better yet, a `pull-request `_!\n \n------------------\n\nCiting\n======\n\nIf you use TensorLy in an academic paper, please cite [1]_::\n\n @article{tensorly,\n author = {Jean Kossaifi and Yannis Panagakis and Anima Anandkumar and Maja Pantic},\n title = {TensorLy: Tensor Learning in Python},\n journal = {Journal of Machine Learning Research},\n year = {2019},\n volume = {20},\n number = {26},\n pages = {1-6},\n url = {http://jmlr.org/papers/v20/18-277.html}\n }\n \n \n.. [1] Jean Kossaifi, Yannis Panagakis, Anima Anandkumar and Maja Pantic, **TensorLy: Tensor Learning in Python**, *Journal of Machine Learning Research (JMLR)*, 2019, volume 20, number 26.", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "Modified BSD", "maintainer": "", "maintainer_email": "", "name": "tensorly-musco", "package_url": "https://pypi.org/project/tensorly-musco/", "platform": "", "project_url": "https://pypi.org/project/tensorly-musco/", "project_urls": null, "release_url": "https://pypi.org/project/tensorly-musco/0.4.5/", "requires_dist": null, "requires_python": "", "summary": "Tensor learning in Python.", "version": "0.4.5", "yanked": false, "yanked_reason": null }, "last_serial": 6038040, "releases": { "0.4.5": [ { "comment_text": "", "digests": { "md5": "8dec4c9921ac2ac8fe62b9cda3475bc1", "sha256": "8ea00cc52c12fbed045acb688776180e6009566a419f2e978e2898a30a483339" }, "downloads": -1, "filename": "tensorly-musco-0.4.5.tar.gz", "has_sig": false, "md5_digest": "8dec4c9921ac2ac8fe62b9cda3475bc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 69862, "upload_time": "2019-10-27T19:06:49", "upload_time_iso_8601": "2019-10-27T19:06:49.340769Z", "url": "https://files.pythonhosted.org/packages/4b/f3/ab89e214be45a6299631c87b697df8581e8bc2d229b0425cfd801dfa3dd5/tensorly-musco-0.4.5.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8dec4c9921ac2ac8fe62b9cda3475bc1", "sha256": "8ea00cc52c12fbed045acb688776180e6009566a419f2e978e2898a30a483339" }, "downloads": -1, "filename": "tensorly-musco-0.4.5.tar.gz", "has_sig": false, "md5_digest": "8dec4c9921ac2ac8fe62b9cda3475bc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 69862, "upload_time": "2019-10-27T19:06:49", "upload_time_iso_8601": "2019-10-27T19:06:49.340769Z", "url": "https://files.pythonhosted.org/packages/4b/f3/ab89e214be45a6299631c87b697df8581e8bc2d229b0425cfd801dfa3dd5/tensorly-musco-0.4.5.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }