Optim.jl
Optim.jl copied to clipboard
Tests to check correct Manifold and Complex number handling
If someone creates a new Optimizer
that can support manifolds, it is useful to have tests that check the correct handling of this.
I propose that we cook up
- [ ] a test that checks that all function calls from the Optimizer are evaluated on the Manifold (correct
retract!
handling), - [ ] a test to that checks that
project_tangent!
is called when needed (may be more difficult?).
Currently, the tests in https://github.com/JuliaNLSolvers/Optim.jl/blob/master/test/multivariate/manifolds.jl catch the breakage errors if the new Optimizer is included in the Stiefel optimization test. There are situations where an algorithm converges even if it forgets to do the correct retract!
and project_tangent!
statements. (This happened to me, so the algorithm performed really poorly, even though it converged).