JuliaNLSolvers / Optim.jl

Optimization functions for Julia
Other
1.13k stars 218 forks source link

Fminbox complaining about parameter eta? #256

Closed anriseth closed 8 years ago

anriseth commented 8 years ago

I'm trying to use Fminbox with LBFGS, but it gives me the following error:

ERROR: unrecognized keyword argument "eta"
 in optimize at /home/riseth/.julia/v0.4/Optim/src/fminbox.jl:188

The same issue arises with BFGS and GradientDescent, but ConjugateGradient seems to work.

Example:

using Optim, ForwardDiff
f(x) = x[1]^2
g!(x,out) = ForwardDiff.gradient!(out,f,x)
df = DifferentiableFunction(f,g!)
optimize(df, [2.0], [-5.0], [5.0], Fminbox(), optimizer=ConjugateGradient) # works
optimize(df, [2.0], [-5.0], [5.0], Fminbox(), optimizer=LBFGS) # fails
pkofod commented 8 years ago

What version of Optim? It works for me.

anriseth commented 8 years ago

Optim 0.4.5 ForwardDiff 0.2.2 Julia 0.4.7-pre+1

pkofod commented 8 years ago

I'm pretty sure the commit that allowed other optimizers than CG was part of Optim v0.5. Could you try updating Optim, or does it conflict with another package?

anriseth commented 8 years ago

That fixed it, thank you. I'm not sure what was causing the conflict.

pkofod commented 8 years ago

Great!