Commit 2158e485 authored by Theo Steininger's avatar Theo Steininger

Fixed bug in line_search_strong_wolfe.py

parent f64657e5
Pipeline #17539 passed with stages
in 33 minutes and 46 seconds
......@@ -158,7 +158,7 @@ class ConjugateGradient(Loggable, object):
if self.reset_count is not None:
reset += (iteration_number % self.reset_count == 0)
if reset:
self.logger.info("Resetting conjugate directions.")
self.logger.info("Computing accurate residuum.")
r = b - A(x)
else:
r -= q * alpha
......
......@@ -139,7 +139,7 @@ class LineSearchStrongWolfe(LineSearch):
phi_alpha1 = le_alpha1.value
if (phi_alpha1 > phi_0 + self.c1*alpha1*phiprime_0) or \
((phi_alpha1 >= phi_alpha0) and (i > 0)):
((phi_alpha1 >= phi_alpha0) and (iteration_number > 0)):
le_star = self._zoom(alpha0, alpha1, phi_0, phiprime_0,
phi_alpha0, phiprime_alpha0, phi_alpha1,
le_0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment