Registering Analytical Derivative with ReverseDiff/ForwardDiff


#1

Is there a way to register a derivative function similar to JuMP’s usage in ForwardDiff or ReverseDiff? I have a small function which solves a simple optimization problem using svd, which isn’t automatically differentiated. But I do know the derivative due to the original formulation.


#2

https://github.com/JuliaDiff/ForwardDiff.jl/pull/165 perhaps?


#3

It seems like that would be exactly what I’m looking for. I’ve requested a status update since it does not seem to be merged with the ForwardDiff package yet.


#4

I’m currently looking into using DiffRules.@define_diffrule since I believe FowardDiff and ReverseDiff fall back on these rules?


#5

Yes, that PR might be replaced with those new stuff in DiffRules.