Skip to content

Commit

Permalink
BUG: recalculate last step in case it has changed
Browse files Browse the repository at this point in the history
During optimization, we update the ranges before running the 4th
and final step with all inputs. If the updating finds that two
inputs are too close to optimize separately, they will be combined
and the total number of optimization steps will decrease. This was
improperly checked before.
  • Loading branch information
Blake Caldwell committed Oct 3, 2019
1 parent edb11b8 commit 80855c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hnn_qt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,8 @@ def optmodel (self):

# reload opt_params for the last step in case the number of
# steps was changed by updateoptparams()
self.opt_params = dconf['opt_info'][total_steps - 1]
final_step = len(dconf['opt_info']) - 1
self.opt_params = dconf['opt_info'][final_step]

txt = "Starting optimization step %d/%d"%(step+1,total_steps)
self.updatewaitsimwin(txt)
Expand Down

0 comments on commit 80855c0

Please sign in to comment.