Skip to content

Commit

Permalink
Merge pull request #40 from zaccharieramzi/vdot
Browse files Browse the repository at this point in the history
Corrected inner product in restarting FISTA
  • Loading branch information
sfarrens authored Mar 26, 2019
2 parents a7d94cf + 6bab15c commit 8c85136
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions modopt/opt/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,7 @@ def is_restart(self, z_old, x_new, x_old):
"""
if self.restart_strategy is None:
return False
criterion = np.dot(
(z_old - x_new).flatten(),
(x_new - x_old).flatten(),
) >= 0
criterion = np.vdot(z_old - x_new, x_new - x_old) >= 0
if criterion:
if 'adaptive' in self.restart_strategy:
self.r_lazy *= self.xi_restart
Expand Down

0 comments on commit 8c85136

Please sign in to comment.