Closed hyl317 closed 1 year ago
Hi @hyl317, the error message is about the line search procedure, not the overall iterations. The parameter to control it is param.max_linesearch
.
Hi @yixuan, Is there is a proper way to handle these kinds of errors rather than handling runtime exceptions?
This commit has removed major runtime exceptions when maximum number of line searches is reached, which should resolve most of the issues above.
There remain some exceptions in the code, which are mostly "serious" issues that are hard to proceed.
Let me first mark this as closed. Feel free to reopen if further issues occur.
Hi, thanks for writing this library! While using it, I encountered the following runtime error,
terminate called after throwing an instance of 'std::runtime_error' what(): the line search routine reached the maximum number of iterations Aborted (core dumped)
My objective function has 200 free parameters; admittedly, this is not a very easy task. However, I wrote python prototype before for this task and used scipy.optimize with LFBG method and it works fine. I also checked my gradient against numerically computed gradient and they agree. What confuses me a bit is that, after seeing this error, I set
param.max_iterations = 0;
which, according to the doc, should allow the optim to continue until an error occurs or convergence. But I am still getting the same error saying maximum number of iterations reached. I wonder if something else is happening? Thanks a lot!