Skip to content

Update der_log function (jacobian) in torch.py

Vicentini Filippo requested to merge github/fork/ChenAo-Phys/master into v3.0

Created by: ChenAo-Phys

Add an optional way to calculate the Jacobian faster using backpack. It's activated automatically whenever the pack is installed and the network structure satisfies the requirements of the pack.

The original method based on for-loops is also kept. It will be used when backpack doesn't work. It's not updated to the new pytorch Jacobian API, because the API is not for network calculation and doesn't accelerate the calculation.

Merge request reports