Metadata-Version: 2.1
Name: backpack-for-pytorch
Version: 1.5.2
Summary: BackPACK: Packing more into backprop
Home-page: https://github.com/f-dangel/backpack
Author: Felix Dangel, Frederik Kunstner
License: MIT
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.7
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
License-File: LICENSE.txt
Requires-Dist: torch (<2.0.0,>=1.9.0)
Requires-Dist: torchvision (<1.0.0,>=0.7.0)
Requires-Dist: einops (<1.0.0,>=0.3.0)
Provides-Extra: docs
Requires-Dist: matplotlib ; extra == 'docs'
Requires-Dist: sphinx-gallery ; extra == 'docs'
Requires-Dist: sphinx-rtd-theme ; extra == 'docs'
Requires-Dist: memory-profiler ; extra == 'docs'
Requires-Dist: tabulate ; extra == 'docs'
Provides-Extra: lint
Requires-Dist: darglint ; extra == 'lint'
Requires-Dist: flake8 ; extra == 'lint'
Requires-Dist: mccabe ; extra == 'lint'
Requires-Dist: pycodestyle ; extra == 'lint'
Requires-Dist: pydocstyle ; extra == 'lint'
Requires-Dist: pyflakes ; extra == 'lint'
Requires-Dist: pep8-naming ; extra == 'lint'
Requires-Dist: flake8-bugbear ; extra == 'lint'
Requires-Dist: flake8-comprehensions ; extra == 'lint'
Requires-Dist: flake8-tidy-imports ; extra == 'lint'
Requires-Dist: black ; extra == 'lint'
Requires-Dist: isort ; extra == 'lint'
Provides-Extra: test
Requires-Dist: scipy ; extra == 'test'
Requires-Dist: pytest (<5.0.0,>=4.5.0) ; extra == 'test'
Requires-Dist: pytest-benchmark (<4.0.0,>=3.2.2) ; extra == 'test'
Requires-Dist: pytest-optional-tests (>=0.1.1) ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: coveralls ; extra == 'test'

# <img alt="BackPACK" src="./logo/backpack_logo_torch.svg" height="90"> BackPACK: Packing more into backprop

[![Travis](https://travis-ci.org/f-dangel/backpack.svg?branch=master)](https://travis-ci.org/f-dangel/backpack)
[![Coveralls](https://coveralls.io/repos/github/f-dangel/backpack/badge.svg?branch=master)](https://coveralls.io/github/f-dangel/backpack)
[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/release/python-370/)

BackPACK is built on top of [PyTorch](https://github.com/pytorch/pytorch). It efficiently computes quantities other than the gradient.

- **Website:** https://backpack.pt
- **Documentation:** https://docs.backpack.pt/en/master/
- **Bug reports & feature requests:** https://github.com/f-dangel/backpack/issues

Provided quantities include:
- Individual gradients from a mini-batch
- Estimates of the gradient variance or second moment
- Approximate second-order information (diagonal and Kronecker approximations)

**Motivation:** Computation of most quantities is not necessarily expensive (often just a small modification of the existing backward pass where backpropagated information can be reused). But it is difficult to do in the current software environment.


## Installation
```bash
pip install backpack-for-pytorch
```

## Examples
- [Basic usage](https://docs.backpack.pt/en/master/basic_usage/example_all_in_one.html)
- [Some use cases](https://docs.backpack.pt/en/master/use_cases/index.html)

#
## Contributing
BackPACK is actively being developed. 
We are appreciating any help.
If you are considering to contribute, do not hesitate to contact us.
An overview of the development procedure is provided in the [developer `README`](https://github.com/f-dangel/backpack/blob/master/README-dev.md).

## How to cite
If you are using BackPACK, consider citing the [paper](https://openreview.net/forum?id=BJlrF24twB) 
```
@inproceedings{dangel2020backpack,
    title     = {Back{PACK}: Packing more into Backprop},
    author    = {Felix Dangel and Frederik Kunstner and Philipp Hennig},
    booktitle = {International Conference on Learning Representations},
    year      = {2020},
    url       = {https://openreview.net/forum?id=BJlrF24twB}
}
```

###### _BackPACK is not endorsed by or affiliated with Facebook, Inc. PyTorch, the PyTorch logo and any related marks are trademarks of Facebook, Inc._

