mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Fixed a bug in the backtracking_line_search() function pointed out by
Ping-Chang Shih. The function ignored the max_iter parameter.
This commit is contained in:
parent
5b2f853c01
commit
353e885908
@ -512,7 +512,7 @@ namespace dlib
|
|||||||
unsigned long iter = 0;
|
unsigned long iter = 0;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
++max_iter;
|
++iter;
|
||||||
const double val = f(alpha);
|
const double val = f(alpha);
|
||||||
if (val <= f0 + alpha*rho*d0 || iter >= max_iter)
|
if (val <= f0 + alpha*rho*d0 || iter >= max_iter)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user