BackPACK: Packing more into backprop
BackPACK is built on top of 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
pip install backpack-for-pytorch
Examples
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.
How to cite
If you are using BackPACK, consider citing the paper
@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.
Release files for backpack-for-pytorch 1.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| backpack_for_pytorch-1.7.1.tar.gz | 1.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| backpack_for_pytorch-1.7.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / backpack_for_pytorch-1.7.1.tar.gz
| Download URL | backpack_for_pytorch-1.7.1.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
edfe332e4b06a69073a6d857c5fd08d286c020be4d411f5c50a729f26f62a30d
|
|
BLAKE2b-256 checksum How to use checksums |
13e6b6d42ce86da2ab55faeb6bbcd3da9aa6cbdb37ef40ac12ce5d81c7044cad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / backpack_for_pytorch-1.7.1-py3-none-any.whl
| Download URL | backpack_for_pytorch-1.7.1-py3-none-any.whl |
|---|---|
| Size | 196.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e54e479524d2733986e8baabaa48c26c67581a0c3a3970d298c5d809db7ef7c
|
|
BLAKE2b-256 checksum How to use checksums |
6fbf28caef15088118806f27fcd23c2f81fd715f9f30a92701f8ba1d931cfde1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|