Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
kozistr committed Nov 24, 2024
1 parent 86b30c8 commit 89435f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/visualize_optimizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def objective_rastrigin(params, minimum=(0, 0)):
return (steps[0][-1] - minimum[0]) ** 2 + (steps[1][-1] - minimum[1]) ** 2


def objective_rosenbrok(params, minimum=(1.0, 1.0)):
def objective_rosenbrock(params, minimum=(1.0, 1.0)):
steps = execute_steps(rastrigin, (-2.0, 2.0), params['optimizer_class'], {'lr': params['lr']}, 100)

return (steps[0][-1] - minimum[0]) ** 2 + (steps[1][-1] - minimum[1]) ** 2
Expand Down Expand Up @@ -171,12 +171,12 @@ def main():

execute_experiments(
optimizers,
objective_rosenbrok,
objective_rosenbrock,
rosenbrock,
plot_rosenbrok,
(-2.0, 2.0),
root_path,
'rosenbrok',
'rosenbrock',
)


Expand Down

0 comments on commit 89435f5

Please sign in to comment.