Backpack
BackPACK - a backpropagation package built on top of PyTorch which efficiently computes quantities other than the gradient.
Install / Use
/learn @f-dangel/BackpackREADME
<img alt="BackPACK" src="./logo/backpack_logo_torch.svg" height="90"> 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.
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
