Git Product home page Git Product logo

Comments (4)

ChrisRackauckas avatar ChrisRackauckas commented on June 1, 2024

Do you have an MWE on this? I'd like to take a look. Tape compilation requires that there aren't branches. When you say "rate coefficients change", that makes me thing you have a callback changing parameters, in which case you might need to use ReverseDiffAdjoint().

from reactionmechanismsimulator.jl.

mjohnson541 avatar mjohnson541 commented on June 1, 2024

Yes, so I've been digging through this the last few days. When I originally implemented I mostly focused on InterpolatingAdjoint, I was aware of the issues with ReverseDiffVJP(true), but that was the only thing that worked properly straight out of the box and while there is branching related to temperature and pressure I thought it would work in more cases that it seems to. ReverseDiffVJP(false) gives me NaNs, which I haven't investigated yet. TrackerVJP() gave me errors, which I've been working on recently. With TrackerVJP after fixing some array concatenation issues I've run into StackOverflowErrors, some of the rate coefficients aren't calculated vectorized, and I suspect through the operations they're causing the vectorized ones to convert to Array{TrackedReal}.

I've attached a jupyter notebook MWE, feel free to take a look. Honestly though I feel like at this stage I'm just trying to figure out how the Reverse mode tools are interacting with the code and trying to make sure it can handle the different types properly.

ConstantVH2Combustion_adjoint_MWE.ipynb.zip

from reactionmechanismsimulator.jl.

ChrisRackauckas avatar ChrisRackauckas commented on June 1, 2024

Interesting, I'll have to catch up on this in a bit. I wonder if those NaNs are true adjoint NaNs (as in bugs), or from numerical accumulation. It'll take some digging.

from reactionmechanismsimulator.jl.

mjohnson541 avatar mjohnson541 commented on June 1, 2024

Closing with merging of #95

from reactionmechanismsimulator.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.