Last minutes' change.
git-svn-id: file:///home/svnrepos/software/liblbfgs/trunk@16 ecf4c44f-38d1-4fa4-9757-a0b4dd0349fc
This commit is contained in:
@@ -355,10 +355,12 @@ int lbfgs(
|
||||
}
|
||||
|
||||
/*
|
||||
Make sure that the gradients are not zero.
|
||||
Make sure that the initial variables are not a minimizer.
|
||||
*/
|
||||
vecnorm(&gnorm, g, n);
|
||||
if (gnorm == 0.) {
|
||||
vecnorm(&xnorm, x, n);
|
||||
if (xnorm < 1.0) xnorm = 1.0;
|
||||
if (gnorm / xnorm <= param->epsilon) {
|
||||
ret = LBFGS_ALREADY_MINIMIZED;
|
||||
goto lbfgs_exit;
|
||||
}
|
||||
|
Reference in New Issue
Block a user