How do I use
Optim.jl to use a preconditioner that changes at each step? The results of the function seem to be ignored in my attempts. Example:
using Optim res = optimize(x->(x-1)^4 + x^2, [2.;1.], Optim.ConjugateGradient(P=I, precondprep = (P,x)->[1;2;3]))
In this example my callback function
precondprep even returns a vector of the wrong dimension (rather than a matrix as it should), but nothing breaks; it seems that the return value is ignored.
I can’t understand much from the documentation, unfortunately.
Thanks in advance!