Conversation
* Remove batch_dim parameter from Engine * Remove test_batched_non_batched_equivalence and test_batched_non_batched_equivalence_2 * Adapt all usages of Engine to not provide batch_dim * Remove FunctionalJacobianComputer * Remove args and kwargs from interface of JacobianComputer, GramianComputer and JacobianAccumulator because they were only needed for the functional interface * Remove kwargs from interface of Hook and stop registering it with with_kwargs=True (args are mandatory though, so rename them as _). * Change JacobianComputer to compute generalized jacobians (shape [m0, ..., mk, n]) and change GramianComputer to compute optional generalized gramians (shape [m0, ..., mk, mk, ..., m0]) * Change engine.compute_gramian to always simply do one vmap level per dimension of the output, without caring about the batch_dim. * Remove all reshapes and movedims in engine.compute_gramian: we don't need reshape anymore since the gramian is directly a generalized gramian, and we dont need movedim anymore since we vmap on all dimensions the same way, without having to put the non-batched dim in front. Merge compute_gramian and _compute_square_gramian. * Add temporary function to create the inital jac_output (dense). This should be updated to a tensor format that is optimized for batched computations.
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
# Conflicts: # tests/speed/autogram/grad_vs_jac_vs_gram.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Already making the PR to keep track of progress, and to be able to update the dev-new-engine branch easily when main is updated.