Skip to main content

BackPACK BackPACK: Packing more into backprop

Travis Coveralls Python 3.8+

BackPACK is built on top of PyTorch. It efficiently computes quantities other than the gradient.

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}
}

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)

Source distribution for backpack-for-pytorch 1.7.1
File Size Uploaded
backpack_for_pytorch-1.7.1.tar.gz 1.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for backpack-for-pytorch 1.7.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.7.1 This release

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page