-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce the approximate Hessian as a default in trust regions. #237
Conversation
Codecov Report
@@ Coverage Diff @@
## master #237 +/- ##
=======================================
Coverage 99.85% 99.85%
=======================================
Files 65 65
Lines 5553 5558 +5
=======================================
+ Hits 5545 5550 +5
Misses 8 8
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Tests here have to wait for JuliaManifolds/Manifolds.jl#592 |
Hi, |
Oh, we can relax that, sure. I can do that over on the #294 where I rework that anyways. Can you wait a bit for that? The PR might take a week still. |
Ah, I see why I did that. The Argument after the gradient can be So it will have to stay that way, sorry. edit: But you can let your functor inherit from function, the approximate Hessian does that as well I think? Hm, I will check carefully whether I see a way to reduce the type. |
Thank you very much for the explanation. |
I will still check whether I see a way to loosen that type a bit, but I am not sure yet. |
I carefully checked – it is not possible to loosen the restrictions on the One thing you can do, which is not too much more effort, is to generate the hessian objective before yourself and then call the solver, so mho = ManifoldHessianObjective(f, grad_f, Hess_f) # precon is a positional argument, if you use `evaluation=` pass it here, too
# call then
trust_regions(M, mho, p) #p is optional, if not provided p=rand(M) is used I hope the comments cover the special cases you might use. Let me know whether that solves your problem. |
Yes, generating the Hessian objective is also possible; I had not thought of it. It definitely solves my problem; thank you very much! |
That approach is originally so you can reuse an objective (here f+grad+hess) in different solvers easily, especially if it is with a cache and such – but here it also nicely can be used for a bit more advanced scenarios like yours. Glad that is helped :) |
...still might have to check for code cov.