-
Notifications
You must be signed in to change notification settings - Fork 32
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
NLS: obj
, grad!
and objgrad!
without residual evaluation
#429
Comments
Makes sense. It could be just a keyword argument, what do you think? |
I like the proposition of Abel, we could add a keyword argument to reuse the value of the |
A keyword should be enough, but do you prefer f = obj(nls, x, Fx; recompute_Fx::Bool=true) or f = obj(nls, x; Fx=residual(nls)) while keeping the current |
The first version with the keyword argument will not break the API. I prefer it. |
Thanks for the comments. I like @paraynaud first suggestion too. I was wondering about this
with the idea
|
I also prefer to not break the current API, so the first suggestion. Maybe the |
Just recompute=true would do it. The hash idea should be benchmarked carefully. I tried recently and found it slower than comparing vector components one by one even for fairly large n. |
There exist functions re-using the residual memory
However, all of them internally call
residual!
. It would be great to also have similar functions that don't evaluate the residual.In a solver context, often we will call
residual!
and then want to evaluate the objective, gradient, etc.Any opinion on this @dpo @abelsiqueira @amontoison @geoffroyleconte @paraynaud ?
The text was updated successfully, but these errors were encountered: