Hi! What’s a good strategy to plot the evolution of the solution x
during the optimization using Optim.jl?
Note: I’m looking for the value of the solution, not the value of the objective function nor the value of the gradient norm that the trace callback contains.
Note 2: I would like to use autodiff=:forward
overall, but would like to avoid the plotting code to be autodiff’ed (it doesn’t help solve the problem), therefore I don’t think I can just put the plotting code inside the function used to optimize (1st arg to optimize()
) ? I’ve tried and getting errors, which makes sense to me since we’re getting passed a forward diff’ed type of the current solution in that function, not the current solution.
I’m sure others have had this need, and just can’t find how to do it.
Thanks!