Skip to content

Commit f9c0baa

Browse files
Update README.md
1 parent 0a07521 commit f9c0baa

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ is given below:
9696
We can also explore other methods in a similar way:
9797

9898
```julia
99-
f = OptimizationFunction(rosenbrock, GalacticOptim.AutoForwardDiff())
100-
prob = OptimizationProblem(f, x0, p)
101-
sol = solve(prob,BFGS())
99+
using ForwardDiff
100+
f = OptimizationFunction(rosenbrock, GalacticOptim.AutoForwardDiff())
101+
prob = OptimizationProblem(f, x0, p)
102+
sol = solve(prob,BFGS())
102103
```
103104
For instance, the above optimization task produces the following output:
104105

@@ -126,8 +127,8 @@ For instance, the above optimization task produces the following output:
126127
```
127128

128129
```julia
129-
prob = OptimizationProblem(f, x0, p, lb = [-1.0,-1.0], ub = [1.0,1.0])
130-
sol = solve(prob, Fminbox(GradientDescent()))
130+
prob = OptimizationProblem(f, x0, p, lb = [-1.0,-1.0], ub = [1.0,1.0])
131+
sol = solve(prob, Fminbox(GradientDescent()))
131132
```
132133
The examples clearly demonstrate that GalacticOptim.jl provides an intuitive
133134
way of specifying optimization tasks and offers a relatively

0 commit comments

Comments
 (0)