diff --git a/include/lbfgs.h b/include/lbfgs.h index e499c6f..2f48995 100644 --- a/include/lbfgs.h +++ b/include/lbfgs.h @@ -153,9 +153,9 @@ enum { /** MoreThuente method proposd by More and Thuente. */ LBFGS_LINESEARCH_MORETHUENTE = 0, /** Backtracking method with strong Wolfe condition. */ - LBFGS_LINESEARCH_BACKTRACKING, + LBFGS_LINESEARCH_BACKTRACKING_STRONG, /** Backtracking method with regular Wolfe condition. */ - LBFGS_LINESEARCH_BACKTRACKING_LOOSE, + LBFGS_LINESEARCH_BACKTRACKING, }; /** @@ -538,9 +538,9 @@ libLBFGS is distributed under the term of the - Version 1.6 (2008-11-02): - Improved line-search algorithm with strong Wolfe condition, which was contributed by Takashi Imamichi. This routine is now default for - ::LBFGS_LINESEARCH_BACKTRACKING. The previous line search algorithm + ::LBFGS_LINESEARCH_BACKTRACKING_STRONG. The previous line search algorithm with regular Wolfe condition is still available as - ::LBFGS_LINESEARCH_BACKTRACKING_LOOSE. + ::LBFGS_LINESEARCH_BACKTRACKING. - Configurable stop index for L1-norm computation. A member variable ::lbfgs_parameter_t::orthantwise_end was added to specify the index number at which the library stops computing the L1 norm of the @@ -563,7 +563,7 @@ libLBFGS is distributed under the term of the - Configurable line search algorithms. A member variable ::lbfgs_parameter_t::linesearch was added to choose either MoreThuente method (::LBFGS_LINESEARCH_MORETHUENTE) or backtracking algorithm - (::LBFGS_LINESEARCH_BACKTRACKING). + (::LBFGS_LINESEARCH_BACKTRACKING_STRONG). - Fixed a bug: the previous version did not compute psuedo-gradients properly in the line search routines for OWL-QN. This bug might quit an iteration process too early when the OWL-QN routine was activated diff --git a/lib/lbfgs.c b/lib/lbfgs.c index a1dbc04..0f5af2f 100644 --- a/lib/lbfgs.c +++ b/lib/lbfgs.c @@ -362,9 +362,7 @@ int lbfgs( linesearch = line_search_morethuente; break; case LBFGS_LINESEARCH_BACKTRACKING: - linesearch = line_search_backtracking; - break; - case LBFGS_LINESEARCH_BACKTRACKING_LOOSE: + case LBFGS_LINESEARCH_BACKTRACKING_STRONG: linesearch = line_search_backtracking; break; default: @@ -756,7 +754,7 @@ static int line_search_backtracking( if (*f <= finit + *stp * dgtest) { /* The sufficient decrease condition. */ - if (param->linesearch == LBFGS_LINESEARCH_BACKTRACKING) { + if (param->linesearch == LBFGS_LINESEARCH_BACKTRACKING_STRONG) { /* Check the strong Wolfe condition. */ vecdot(&dg, g, s, n); if (dg > -wolfe * dginit) { diff --git a/sample/sample.c b/sample/sample.c index 7e06185..4e707a3 100644 --- a/sample/sample.c +++ b/sample/sample.c @@ -65,7 +65,7 @@ int main(int argc, char *argv) /* Initialize the parameters for the L-BFGS optimization. */ lbfgs_parameter_init(¶m); param.orthantwise_c = 1; - /* param.linesearch = LBFGS_LINESEARCH_BACKTRACKING; */ + /* param.linesearch = LBFGS_LINESEARCH_BACKTRACKING_STRONG; */ /* Start the L-BFGS optimization; this will invoke the callback functions