lesson 22/11, heavy ball method not translated yet
This commit is contained in:
@ -80,9 +80,8 @@ function NWTN(f;
|
||||
if printing
|
||||
@printf(" %2d", lsiter)
|
||||
end
|
||||
a = as;
|
||||
a = as
|
||||
return (a, phia) # Armijo + strong Wolfe satisfied, we are done
|
||||
|
||||
end
|
||||
if phips ≥ 0
|
||||
break
|
||||
@ -272,7 +271,7 @@ function NWTN(f;
|
||||
# output statistics - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
if fStar > -Inf
|
||||
gapk = ( v - fStar ) / max(abs( fStar ), 1)
|
||||
gapk = (v - fStar) / max(abs(fStar), 1)
|
||||
|
||||
if printing
|
||||
@printf("%4d\t%1.4e\t%1.4e", feval, gapk, ng)
|
||||
|
||||
Reference in New Issue
Block a user