Dangerous type piracy
Opened this issue · 4 comments
ChrisRackauckas commented
ThummeTo commented
Yep, you got me :)
Is there a reason why increment_deriv!
is not defined for a ZeroTangent
-increase?
In my head incrementing a TrackedReal by ZeroTangent shoud be defined, but just be a no-op.
If not, I need to dig deeper and prevent this call from happening...
ChrisRackauckas commented
If this is needed then upstream it?
ZeroTangent though is from ChainRules.jl, which ReverseDiff doesn't integrate with. This seems like however you did some chainrules thing forgot to handle this case.
ThummeTo commented
you are right, I will check for that... maybe the @grad_from_chainrules macro
ThummeTo commented
you are right, I will check for that... maybe the @grad_from_chainrules macro