From 3150ff537e8fb989a3d086b6d3f4a5bdaa4876e5 Mon Sep 17 00:00:00 2001 From: Theo Steininger <theo.steininger@ultimanet.de> Date: Thu, 11 May 2017 02:20:01 +0200 Subject: [PATCH] Bug fixes. --- nifty/minimization/__init__.py | 2 +- nifty/minimization/line_searching/line_search_strong_wolfe.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nifty/minimization/__init__.py b/nifty/minimization/__init__.py index bcb596402..83001f491 100644 --- a/nifty/minimization/__init__.py +++ b/nifty/minimization/__init__.py @@ -18,7 +18,7 @@ from line_searching import * from conjugate_gradient import ConjugateGradient -from descent_minimizer import QuasiNewtonMinimizer +from descent_minimizer import DescentMinimizer from steepest_descent import SteepestDescent from vl_bfgs import VL_BFGS from relaxed_newton import RelaxedNewton diff --git a/nifty/minimization/line_searching/line_search_strong_wolfe.py b/nifty/minimization/line_searching/line_search_strong_wolfe.py index 084775eed..e6b949690 100644 --- a/nifty/minimization/line_searching/line_search_strong_wolfe.py +++ b/nifty/minimization/line_searching/line_search_strong_wolfe.py @@ -148,8 +148,8 @@ class LineSearchStrongWolfe(LineSearch): # extract the full energy from the line_energy energy_star = energy_star.energy - length_direction = pk.norm - step_length = alpha_star * length_direction + direction_length = pk.norm() + step_length = alpha_star * direction_length return step_length, phi_star, energy_star def _zoom(self, alpha_lo, alpha_hi, phi_0, phiprime_0, -- GitLab