Hessian and HVP training capability for HIPPYNN #178
+549
−20
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added the HessianNode, HVPVectorNode, HVPNode, and TrueHVPNode classes in hippynn/graphs/nodes/physics.py
Added the Hessian, HVPVector, HVP, and TrueHVP modules in hippynn/layers/physics.py
Modified the h6_pyanitools.py in hippynn/databases/ to be compatible with the Hessian matrices with shape (B, 3N, 3N). It now pads dimensions with sizes that are any multiple of N.
Modified the WeightedMSELoss function in hippynn/layers/algebra.py so that it checks if the weights and the losses have the same shape and makes sure the mask dtype is equal to the unweighted loss dtype
Added the training script for Hessian training (hessian_training.py) in the examples directory