Skip to content

Commit

Permalink
Restrict Armijo linesearch function step to be at most 1 (PythonOT#189)
Browse files Browse the repository at this point in the history
Thanks for the modification @panpan2
  • Loading branch information
panispani authored May 25, 2020
1 parent 0adc8aa commit 5af6452
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ot/optim.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def phi(alpha1):
alpha, phi1 = scalar_search_armijo(
phi, phi0, derphi0, c1=c1, alpha0=alpha0)

return alpha, fc[0], phi1
return min(1, alpha), fc[0], phi1


def solve_linesearch(cost, G, deltaG, Mi, f_val,
Expand Down

0 comments on commit 5af6452

Please sign in to comment.