Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combined function/jacobian interface #5

Open
pkienzle opened this issue Sep 15, 2023 · 2 comments
Open

Combined function/jacobian interface #5

pkienzle opened this issue Sep 15, 2023 · 2 comments
Labels

Comments

@pkienzle
Copy link

With chain rule one often sees many common sub-expressions in the calculation of the function and its derivatives. It would save time to compute the two of these together rather than having one call to the function and one call to the jacobian.

@hahnec
Copy link
Owner

hahnec commented Sep 15, 2023

I see your point to gain computational performance here. However, this would require the user to provide only part of the derivative function? Such an interface would be quite custom/unconventional or at least not straightforward... Feel free to draft this as a separate and more performant function. Again, I am happy to accept PRs.

@hahnec hahnec added the feature label Sep 15, 2023
@pkienzle
Copy link
Author

Figuring out a nice interface will take some effort.

In particular I would like it to be able to use the autodifferentiation tools in torch if the function supports them. I also have functions implemented in pure cuda which I'm planning to tie in through cupy. These will need either numerical differentiation or hard-coded analytic forms, so I don't want to require AD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants