Get computed incremental step

94 views
Skip to first unread message

Jesús Briales García

unread,
Mar 15, 2018, 12:45:44 PM3/15/18
to Ceres Solver
Hi,
I'm trying to debug some optimization and was interested in seeing the incremental step computed by the solver in each iteration.
The iteration summary provides the step norm, but not the whole vector. Is it possible to access this somehow?

Best regards,
- Jesus Briales

Sameer Agarwal

unread,
Mar 15, 2018, 12:51:10 PM3/15/18
to ceres-...@googlegroups.com
Hi Jesus,
No short of putting some debugging statements yourself in the code, there isn't a way to access it. 
What is it that you are trying to do?

it is possible to dump the gauss-newton system to disk though and you could load it in matlab and compute the step yourself if youlike.


Sameer


--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/9bad50ac-f492-4636-a1e5-1b5620cf44c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jesús Briales García

unread,
Mar 17, 2018, 12:21:37 AM3/17/18
to Ceres Solver
Hi Sameer,
Thanks for your answer! Actually I was looking at alternatives to figure out where some convergence issues where coming from, but got that fixed for now.
Also the ability to dump the Gauss-Newton system seems really useful, I'll keep that in mind!

Best regards,
- Jesus Briales

Keir Mierle

unread,
Mar 19, 2018, 5:35:29 AM3/19/18
to ceres-...@googlegroups.com
Hi Jesús,

Depending on what you mean by "incremental step", you can get at the intermediate parameter values for successful steps. In particular, if you set Solver::Options::update_state_every_iteration, then your parameter blocks will be updated before the IterationCallback is invoked. If you want to see what has changed, you can cache the parameter values and compare.

You can use this mechanism to, for example, plot what the parameters are doing during the optimization.

Happy optimizing,
Keir


Jesús Briales García

unread,
Mar 21, 2018, 11:27:49 AM3/21/18
to Ceres Solver
Hi Keir,
That approach also sounds good.
Actually my question arose because I assumed that the result of solving the linear system, before applying this step onto the state, would be available somewhere. From your answers I understand that's not the case but the proposed workarounds sound well enough :)

Thanks again!
- Jesus
Reply all
Reply to author
Forward
0 new messages