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

Metadata

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 Provenance Actions
backpack_for_pytorch-1.7.1.tar.gz 1.2 MB Without provenance Details for backpack_for_pytorch-1.7.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for backpack-for-pytorch 1.7.1
File Interpreter ABI Platform Actions
backpack_for_pytorch-1.7.1-py3-none-any.whl Python 3 none any Details for backpack_for_pytorch-1.7.1-py3-none-any.whl

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

Security for backpack-for-pytorch 1.7.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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