curvlinops-for-pytorch-1.1.0
توضیحات
scipy Linear operator implementations of the GGN and Hessian in PyTorch
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | curvlinops-for-pytorch-1.1.0 |
| نام | curvlinops-for-pytorch |
| نسخه کتابخانه | 1.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Felix Dangel, Lukas Tatzel |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/f-dangel/curvlinops |
| آدرس اینترنتی | https://pypi.org/project/curvlinops-for-pytorch/ |
| مجوز | MIT |
# <img alt="Logo" src="./docs/rtd/assets/logo.svg" height="90"> scipy linear operators of deep learning matrices in PyTorch
[](https://www.python.org/downloads/release/python-370/)

[](https://coveralls.io/github/f-dangel/curvlinops)
This library implements
[`scipy.sparse.linalg.LinearOperator`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.LinearOperator.html)s
for deep learning matrices, such as
- the Hessian
- the Fisher/generalized Gauss-Newton (GGN)
- the Monte-Carlo approximated Fisher
- the uncentered gradient covariance (aka empirical Fisher)
Matrix-vector products are carried out in PyTorch, i.e. potentially on a GPU.
The library supports defining these matrices not only on a mini-batch, but
on data sets (looping over batches during a `matvec` operation).
You can plug these linear operators into `scipy`, while carrying out the heavy
lifting (matrix-vector multiplies) in PyTorch on GPU. My favorite example for
such a routine is
[`scipy.sparse.linalg.eigsh`](https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.eigsh.html)
that lets you compute a subset of eigenpairs.
- **Documentation:** https://curvlinops.readthedocs.io/en/latest/
- **Bug reports & feature requests:**
https://github.com/f-dangel/curvlinops/issues
## Installation
```bash
pip install curvlinops-for-pytorch
```
## Examples
- [Basic
usage](https://curvlinops.readthedocs.io/en/latest/basic_usage/example_matrix_vector_products.html#sphx-glr-basic-usage-example-matrix-vector-products-py)
## Future ideas
Other features that could be supported in the future include:
- Other matrices
- the centered gradient covariance
- terms of the [hierarchical GGN
decomposition](https://arxiv.org/abs/2008.11865)
- Block-diagonal approximations (via `param_groups`)
###### Logo mage credits
- SciPy logo: Unknown, [CC BY-SA
4.0](https://creativecommons.org/licenses/by-sa/4.0), via Wikimedia Commons
- PyTorch logo: https://github.com/soumith, [CC BY-SA
4.0](https://creativecommons.org/licenses/by-sa/4.0), via Wikimedia Commons
نیازمندی
| مقدار | نام |
|---|---|
| <2.0.0,>=1.5.0 | backpack-for-pytorch |
| <2.0.0,>=1.7.1 | scipy |
| <5.0.0,>=4.61.0 | tqdm |
| - | matplotlib |
| - | functorch |
| - | sphinx-gallery |
| - | sphinx-rtd-theme |
| - | black |
| - | flake8 |
| - | mccabe |
| - | pycodestyle |
| - | pyflakes |
| - | pep8-naming |
| - | flake8-bugbear |
| - | flake8-comprehensions |
| - | flake8-tidy-imports |
| - | darglint |
| - | pydocstyle |
| - | isort |
| - | matplotlib |
| - | coveralls |
| - | pytest |
| - | pytest-cov |
| - | pytest-optional-tests |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl curvlinops-for-pytorch-1.1.0:
pip install curvlinops-for-pytorch-1.1.0.whl
نصب پکیج tar.gz curvlinops-for-pytorch-1.1.0:
pip install curvlinops-for-pytorch-1.1.0.tar.gz