JuliaDiff / ReverseDiff.jl

Reverse Mode Automatic Differentiation for Julia
Other
348 stars 57 forks source link

Make it easy for users to inject derivative definitions #15

Open jrevels opened 8 years ago

jrevels commented 8 years ago

Just realized I misinterpreted the point of #5, so I'm superceding that issue with this one. We should probably have a mechanism for user-defined derivatives that works for n-ary, multivariate functions.

samuela commented 4 years ago

Is there a way to accomplish this at the moment?

ChrisRackauckas commented 4 years ago

It was completed in https://github.com/JuliaDiff/ReverseDiff.jl/pull/123 and has the same semantics as Zygote.@adjoint. I think @oxinabox is going to make it connect to ChainRules.jl soon too.

oxinabox commented 4 years ago

@mohamed82008 is going to do it soon, but is currently thesis stuff, I am going to finish making Nabla.jl do this soon, so there will be something difficult to base it on. (There are examples in the ChainRulesCore docs, but once you want to do a real AD handling every edge case it is a bit more complex.)