Skip to main content

BackPACK: Packing more into backprop

Project description

BackPACK BackPACK: Packing more into backprop

Travis Coveralls Python 3.7+

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}
}
BackPACK is not endorsed by or affiliated with Facebook, Inc. PyTorch, the PyTorch logo and any related marks are trademarks of Facebook, Inc.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

backpack-for-pytorch-1.5.1.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

backpack_for_pytorch-1.5.1-py3-none-any.whl (182.7 kB view details)

Uploaded Python 3

File details

Details for the file backpack-for-pytorch-1.5.1.tar.gz.

File metadata

  • Download URL: backpack-for-pytorch-1.5.1.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0

File hashes

Hashes for backpack-for-pytorch-1.5.1.tar.gz
Algorithm Hash digest
SHA256 64c4c4b47bd79e8015faf98f64ff383213d1bf30e2768abeea4516472129f196
MD5 59e7da4f5c3ea6f91b9312f6665a0970
BLAKE2b-256 09bcfcd188b204af40b4c339130148b8f9edec02e1eacb70eda3e8ed0319acc4

See more details on using hashes here.

File details

Details for the file backpack_for_pytorch-1.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for backpack_for_pytorch-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77c4dddef5cf51e5bd73ba35c845ffe20c42605b114e5c7fc49efdcea35fb85f
MD5 6a85a8d809797a42c7e3fe168738c9f8
BLAKE2b-256 b26942322823424acf6f352631465af98a12cd3137b343c7162ff67ede0efbbc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page