Your dlib is definitely a very good library.
But, unfortunately, I got an error as following when I use solve_least_squares_lm().
Error detected at line 1177.
Error detected in file /usr/local/lib/cpp/dlib18_0/dlib/matrix/matrix.h.
Error detected in function T& dlib::matrix<T, num_rows,="" num_cols,="" mem_manager,="" layout="">::operator()(long int) [with T = double, long int num_rows = 0l, long int num_cols = 1l, mem_manager = dlib::memory_manager_stateless_kernel_1<char>, layout = dlib::row_major_layout].
Failing expression was 0 <= i && i < size().
const type matrix::operator(i)
You must give a valid row/column number
I traced it on gdb and found that it occurs at line 629 of dlib/matrix/matrix_eigenvalue.h.
It seems not to care the case m==n, which causes overrunning on vector d.
Would you tell me how should I fix?
Sooner is better because the program is for business.
Hmm, that's no good.
Does changing line 588 in matrix_eigenvalue.h from this:
while (m < n)
while(m < n+1)
fix the problem?
Sorry Davis, I found it was my fault.
I gave NaN derivative value to the LM method.
Your implementation is correct.
Sorry again for annoying you.
P.S. NaN-Check of gradient (and hessian if the cost is acceptable) in LM method can help debugging.
You can prevent foolish post like this one :P
No worries :)
That's a good idea. I'll add some debug mode only NaN checks.