All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
This small release improves ResNet support of some second-order extensions and adds some more custom layers.
Thanks to @jabader97 for contributing to KFAC
.
KFAC
for ResNets modules (commit)- Custom modules for
{Batch}DiagGGN{Exact,MC}
,{Batch}DiagHessian
support forSqrtGGN{Exact,MC}
support for
- Automate PyPI release through GitHub action (commit)
- Add
KFAC
tests for linear layers to test suite (commit) - Update formatting to
black==22.1.0
(commit) - Add BackPACK logo to RTD (commit)
1.4.0 - 2021-11-12
This release ships many new features. Some rely on recent PyTorch functionality.
We now require torch>=1.9.0
.
Highlights:
- ResNets & RNNs: Thanks to @schaefertim for bringing basic support for RNNs (#16, tutorial) and ResNets (#14, tutorial)
SqrtGGN{Exact,MC}
extension: Symmetric factorization of the generalized Gauss-Newton/Fisher (see arXiv:2106.02624)- Sub-sampling: Allows for restricting BackPACK extensions to a sub-set of samples in the mini-batch (#12, tutorial)
- Converter functionality for basic support of ResNets and RNNs [PR1, PR2, PR3]
- New extensions:
- Module support:
Linear
: Support additional (more than 2) input dimensions [PR1, PR2]BatchNormNd
: Distinguish evaluation and training mode, support first-order extensions andDiagGGN{Exact,MC}
[#160, PR1, PR2]AdaptiveAvgPoolND
: Support first-order extensions andDiagGGN{Exact,MC}
[PR]RNN
: Support first-order extensions andDiagGGN{MC,Exact}
[PR1 PR2 PR3]LSTM
: Support first-order extensions andDiagGGN{MC,Exact}
[PR]CrossEntropyLoss
: Support additional (more than 2) input dimensions. [PR]Embedding
: Support first-order extensions andDiagGGN{MC,Exact}
[PR]
- Mini-batch sub-sampling
retain_graph
option forbackpack
context [PR]- Assume batch axis always first [PR]
- Deprecate
python3.6
, require at leastpython3.7
[PR]
- Use
full_backward_hook
fortorch>=1.9.0
[PR] - Core
- Extensions
- Tests
1.3.0 - 2021-06-16
Thanks to @sbharadwajj and @schaefertim for co-authoring many PRs shipped in this release.
- New extensions
- Support for more layers
([PR,
overview])
DiagGGN{Exact,MC}
extensionsDiagHessian
extensiongroup
argument of (transpose) convolutions
- Extension hook which allows to run code right after a BackPACK extension [PR, example]
- Context to disable BackPACK [PR]
- Tutorial how to extend custom modules [PR, example]
- (Experimental) Alternative convolution weight Jacobian with option to save memory [PR, example]
- Remove hooks that save input/output shapes. This probably resolves #97 [PR]
- Remove
DiagGGN
from API (useDiagGGNExact
instead). It was indented as abstract parent class forDiagGGNExact
andDiagGGNMC
[PR]
- CI
- Move tests from Travis to GitHub actions [PR, small fix]
- Test
DiagHessian
with new test suite [PR] - Test
DiagGGN
with new test suite, introduce 'light' and 'full' tests [PR1, PR2] - Fix
isort
[PR] - Add partial docstring checks [PR]
- Add docstrings to contribution guide lines [commit]
- Auto-format and lint examples [PR]
- Refactoring
- Core
1.2.0 - 2020-10-26
Thanks to @sbharadwajj for co-authoring many PRs shipped in this release.
- Deprecated
python3.5
, tested compatibility with PyTorch 1.6.0 [PR] - Support first-order extensions for
Conv1d
,Conv3d
,ConvTranspose1d
,ConvTranspose2d
,ConvTranspose3d
- New example: Backpropagating through BackPACK quantities [commit]
- New extensions in API: Block-diagonal curvature products
- Add missing
zero_grad
in the diagonal GGN second-order optimization example [PR]
- Increased test coverage
- Implemented derivatives of the following operations in
backpack.core
- Refactor
firstorder
extensions to share more code [PR1, PR2] - Removed
detach
s to support differentiating through quantities [PR]
1.1.1 - 2020-04-29
- Improved documentation, moved to ReadTheDocs [PR1, PR2, PR3]
- Tested compatibility with PyTorch 1.5.0.
- Support 2nd-order backprop for vectors in
MSELoss
[PR] - Sanity checks to raise warnings if the following are used.
inplace
modification [PR], unsupported loss parameters [PR], custom losses in 2nd-order backpropagation [PR]
- Removed
opt_einsum
dependency [PR] - Missing implementations and wrong backpropagation of KFRA
for
Conv2d
,MaxPool2d
, andAvgPool2d
[PR] - Remove
try_view
and usereshape
to use PyTorch 1.4.0 improvements [PR]
- Docstring style [PR]
1.1.0 - 2020-02-11
- Fixed documentation issue in
Batch l2
[PR] - Added support for stride parameter in Conv2d [Issue, PR]
- Pytorch
1.3.0
compatibility [PR, PR]
- Added continuous integration [PR], test coverage [PR], style guide enforcement [PR]
- Changed internal shape conventions of backpropagated quantities for performance improvements [PR]
1.0.1 - 2019-09-05
- Fixed PyPI installaton
1.0.0 - 2019-10-03
Initial release