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

Differentiability #217

Open
jakubMitura14 opened this issue Jul 22, 2022 · 4 comments
Open

Differentiability #217

jakubMitura14 opened this issue Jul 22, 2022 · 4 comments

Comments

@jakubMitura14
Copy link

Hello is it possible to differentiate simulation for optimazation purposes ?

@rafaqz
Copy link
Member

rafaqz commented Jul 22, 2022

Its possible, there is even a differentiable branch where I used Zygote on small grids. I think there are better ways to do that though.

On master you can only use ReverseDiff.jl or similar.

But all options are pretty slow. We could work on making it faster I guess, but I havent had the time.

Raw simulations are fast enough to just run a million times and optimise without using gradients.

@jakubMitura14
Copy link
Author

thank you !

@rafaqz
Copy link
Member

rafaqz commented Mar 9, 2023

With Enzyme.jl maturing we should be able to differentiate steps of simulations.

Rules should never allocate or have any type stability anyway so the only shortcomings of Enzyme do not apply in our case. Someone will just need to try it out, probably using step! manually rather than sim!.

@jakubMitura14
Copy link
Author

Thank you for getting with the update!

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

No branches or pull requests

2 participants