model = torch.nn.Sequential( torch.nn.Linear(784, 64), torch.nn.ReLU(), torch.nn.Linear(64, 10) )
This page lists the layers currently supported by BackPACK.
Do not rewrite the
forward() function of the
Sequential or the inner modules!
If the forward is not standard, the additional backward pass to compute second-order quantities will not match the actual function.
First-order extensions that extract information might work outside of this framework, but it is not tested.
For first-order extensions¶
BackPACK can extract more information about the gradient with respect to the parameters of the following layers;
First-order extensions should support any module as long as they do not have parameters,
but some layers lead to the concept of “individual gradient for a sample in a minibatch”
to be ill-defined, as they introduce dependencies across examples
For second-order extensions¶
BackPACK needs to know how to propagate second-order information. This is implemented for:
|Layers without parameters||
The other convolution layers (
are not yet supported.