Commit f3d82655 authored by Martin Reinecke's avatar Martin Reinecke

normalize descent direction for SteepestDescent and VL_BFGS (but not for RelaxedNewton\!)

parent f64c8f54
Pipeline #16770 failed with stage
in 13 minutes and 11 seconds
......@@ -39,4 +39,6 @@ class SteepestDescent(DescentMinimizer):
"""
return -energy.gradient
res = energy.gradient.copy()
res *= -1./res.norm()
return res
......@@ -84,6 +84,7 @@ class VL_BFGS(DescentMinimizer):
for i in xrange(1, len(delta)):
descent_direction += delta[i] * b[i]
descent_direction *= 1./descent_direction.norm()
return descent_direction
......
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