Skip to content

Commit

Permalink
fixed a bug in CG that prevented it from running
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas A. (Bram) Willemsen committed Apr 27, 2015
1 parent 0eeab2e commit ebc302b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pysit/optimization/cg.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _select_step(self, shots, current_objective_value, gradient, iteration, obje
"""

reset = (self.reset_length is not None) and (not np.mod(i, self.reset_length))
reset = (self.reset_length is not None) and (not np.mod(iteration, self.reset_length))

if (self.prev_gradient is None) or reset:
direction = -1*gradient
Expand Down

0 comments on commit ebc302b

Please sign in to comment.