fixedpoint doesn't work with autodiff
amrods opened this issue · comments
amrods commented
Both of these throw an error:
fixedpoint(x -> 0.5*(2/x + x), [1.0]; autodiff=:true)
ERROR: TypeError: in keyword argument autodiff, expected Symbol, got a value of type Bool
fixedpoint(x -> 0.5*(2/x + x), [1.0]; autodiff=true)
ERROR: TypeError: in keyword argument autodiff, expected Symbol, got a value of type Bool
amrods commented
I think what happens is that fixedpoint
calls nlsolve
, but the latter takes autodiff=:forward
as an option, rather than autodiff=:true
as the documentation states. Specifically, this sentence in the Fixed Points section needs to be fixed:
- Autodifferentiation is supported; e.g.
fixedpoint(f!, init_x; method = :newton, autodiff = :true)
.