I am using OptimizationOptimJL, and wish to supply my own gradients. There are many common calculations that are shared when evaluating the objective function, and the gradients, so I wish to have a single function that can return both. Is it possible to do this when defining the OptimizationFunction?
I think this might be answered in their Tips and Tricks section in the manual.
Not right now. The optimizer doesn’t make great use of it anyways so it wasn’t a major optimization loss, but we may add it to the interface in the near future.