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

Change lambda function differentiation to produce valid source code and work with lambda functions with captures (reverse mode) #1054

Open
gojakuch opened this issue Aug 22, 2024 · 0 comments · May be fixed by #1126

Comments

@gojakuch
Copy link
Collaborator

currently, if a function contains a lambda expression, Clad treats it as a special case of a functor. there's no general support for lambdas with captures yet. however, I believe at this point we should stop treating lambda functions as functors but instead generate separate lambda functions representing the pullback of the initial lambda. this way Clad wouldn't need to modify the lambda class that is impossible for the user to manipulate.

pullbacks of the functions that accept lambdas as their arguments would then need to accept both the initial lambda f and its pullback d_f.

this ensures valid source code generation.

@gojakuch gojakuch linked a pull request Nov 1, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant