You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to optimize a function in a box constrained setting. I cannot provide its gradient. This seems not to be an issue if I am not asking for any options, but as soon as I put some, I have the following error.
x_0 = [1., 1.]
lower = zeros(length(x_0))
upper = ones(length(x_0))
optimize(f, x_0, Optim.Options(time_limit = 15.0))
# works
optimize(f,lower, upper, x_0)
# works
optimize(f,lower, upper, x_0 , Optim.Options(time_limit = 15.0))
# fails :
# MethodError: objects of type Vector{Float64} are not callable
# Use square brackets [] for indexing an Array.
# I assume that the problem comes from not providing "g"
I am not sure if this comes from misuse from my side.
The text was updated successfully, but these errors were encountered:
Have you tried explicitly instantiating the solver and wrapping it in Fminbox? e.g. Fminbox(NelderMead()).
Fminbox is used in the examples under Box Constrained Optimization. It's a bit indirect to learn about it; the documentation could certainly use some updating. Also, I am not sure if Fminbox works for gradient-free solvers.
Edit: I just checked the source code and Fminbox does indeed seem to support gradient-free methods.
I am trying to optimize a function in a box constrained setting. I cannot provide its gradient. This seems not to be an issue if I am not asking for any options, but as soon as I put some, I have the following error.
I am not sure if this comes from misuse from my side.
The text was updated successfully, but these errors were encountered: