In the underlying fortran code by Nocedal et al. (lbfgsb.f) makes an or condition between the two criterion.
c Test for termination.
if (sbgnrm .le. pgtol) then
c terminate the algorithm.
task = 'CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL'
goto 999
endif
ddum = max(abs(fold), abs(f), one)
if ((fold - f) .le. tol*ddum) then
c terminate the algorithm.
task = 'CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH'
if (iback .ge. 10) info = -5
c i.e., to issue a warning if iback>10 in the line search.
goto 999
endif
In the underlying fortran code by Nocedal et al. (
lbfgsb.f
) makes an or condition between the two criterion.