Skip to content

BackPACK - a backpropagation package built on top of PyTorch which efficiently computes quantities other than the gradient.

License

Notifications You must be signed in to change notification settings

f-dangel/backpack

Folders and files

NameName
Last commit message
Last commit date
Nov 12, 2024
Nov 21, 2024
Dec 20, 2022
Nov 12, 2024
Apr 17, 2020
Nov 21, 2024
Nov 11, 2024
Aug 2, 2021
Jan 2, 2020
Nov 11, 2024
Oct 5, 2019
Jun 26, 2023
Jun 26, 2023
Jun 14, 2021
Nov 21, 2024
Nov 21, 2024
Jun 21, 2021
Nov 12, 2024
Jun 16, 2021
Nov 12, 2024

Repository files navigation

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

About

BackPACK - a backpropagation package built on top of PyTorch which efficiently computes quantities other than the gradient.

Resources

License

Stars

Watchers

Forks

Packages

No packages published