You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, using JuliaDiff/ChainRulesCore.jl#626 if you want to test something that MutableTangent that does work e.g.: test_frule(setfield!, MDemo(3.5)⊢MutableTangent{MDemo}(x=2.0), :x, 5.0)
But if you just do: test_frule(setfield!, MDemo(3.5), :x, 5.0)
you get an error because the default type we use for structural tangents is the immutable Tangent
We could use the StructuralTangent constructor to automatically chose MutableTangent for mutable primals.
we would want to do that forwardward mode, at least. Not sure if we should also do that in reverse
The text was updated successfully, but these errors were encountered:
This is a follow up to JuliaDiff/ChainRulesCore.jl#105 (comment)
Right now, using JuliaDiff/ChainRulesCore.jl#626 if you want to test something that MutableTangent that does work e.g.:
test_frule(setfield!, MDemo(3.5)⊢MutableTangent{MDemo}(x=2.0), :x, 5.0)
But if you just do:
test_frule(setfield!, MDemo(3.5), :x, 5.0)
you get an error because the default type we use for structural tangents is the immutable
Tangent
We could use the
StructuralTangent
constructor to automatically choseMutableTangent
for mutable primals.we would want to do that forwardward mode, at least. Not sure if we should also do that in reverse
The text was updated successfully, but these errors were encountered: