I have a very simple question, but for some reason I could not find an answer in the docs or in the forum (I must have missed it). When using the optimization routines, how do I check if they actually converged?
Here is the code snipped I am using:
double res = dlib::find_min_box_constrained(dlib::lbfgs_search_strategy(10),
dlib::objective_delta_stop_strategy(1.0e-8,1000),
obj_fun, dlib::derivative(obj_fun,1.0e-6), init_value, 0.0, 30.0);
Last edit: Sigurður Ægir Jónsson 2015-05-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
To do that you have to write your own version of the objective_delta_stop_strategy object that behaves in the way you want. If you look at the objective_delta_stop_strategy object it should be clear how to make your own.
Last edit: Davis 2015-05-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I would like to know how to find the source code of "objective_delta_stop_strategy" in order to make my own objective_delta_stop_strategy. I can only find the guide for using it in abstract.h. I must miss something. Thank you very much for your kind answer again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a very simple question, but for some reason I could not find an answer in the docs or in the forum (I must have missed it). When using the optimization routines, how do I check if they actually converged?
Here is the code snipped I am using:
double res = dlib::find_min_box_constrained(dlib::lbfgs_search_strategy(10),
dlib::objective_delta_stop_strategy(1.0e-8,1000),
obj_fun, dlib::derivative(obj_fun,1.0e-6), init_value, 0.0, 30.0);
Last edit: Sigurður Ægir Jónsson 2015-05-07
Are you asking how you know if it terminated because of the 1e-8 condition
vs the 1000 iteration limit?
Yes, that would be sufficient.
To do that you have to write your own version of the objective_delta_stop_strategy object that behaves in the way you want. If you look at the objective_delta_stop_strategy object it should be clear how to make your own.
Last edit: Davis 2015-05-07
I will do that. Thank you very much.
Hi, I would like to know how to find the source code of "objective_delta_stop_strategy" in order to make my own objective_delta_stop_strategy. I can only find the guide for using it in abstract.h. I must miss something. Thank you very much for your kind answer again.
Use git grep to find stuff like this