Skip to content

Support Events for BacksolveAdjoint #698

@LuggiStruggi

Description

@LuggiStruggi

Hi! :)

I just wanted to ask if its possible to also support Events for the BacksolveAdjoint. I know that its advised against using BacksolveAdjoint by this library in general but it would be nontheless interesting for me, regarding the memory efficiency as well as a baseline.

I guess in _adjoint.py, _loop_backsolve_fwd would need to save the event_mask (or just a flag if an event happend in the end or not) as one of the residuals and then in _loop_backsolve_bwd if the event happend add the correction term to the backward dynamics based on gradients of the cond_fn or smth like that?

I might be overlooking something that is obvious, why it is not yet implemented.
If you think its possible i could try to implement it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions