Closed DevonMorris closed 1 year ago
Thanks for opening this issue and the helpful analysis! This is a bug: instead of take_param
, get_param
should be used (followed by cloning the parameters). Would you be willing to open a PR with the fix?
Apologies for the very late reply. My access to internet is currently very limited (#360).
This is a very busy week for me, hopefully I can get around to it next week some time.
Sure, take your time! (And I really hope I'll be able to publish a new release soon!)
Closed by !363
Currently the
SteepestDescent
solver startsnext_iter
withstate.take_param()
setting the current parameter toNone
. Then once the line search has run, the state is updated withparam()
which swapsparam
andprev_param
. This in effect leaves the prev_param returned bySteepestDescent
viastate
asNone.
This is not a problem for a fixed iteration run of the steepest descent solver, but does become a problem when trying to use SteepestDescent as an inner solver with custom termination criteria based on the previous state.
In more concrete terms, given the current implementation I have to implement something like
Where
inner_solver
is a steepest descent. It would be nicer to be able to simply have