Skip to content
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

OEP: function-objects should keep track of their own call counts #305

Closed
timholy opened this issue Nov 14, 2016 · 2 comments
Closed

OEP: function-objects should keep track of their own call counts #305

timholy opened this issue Nov 14, 2016 · 2 comments

Comments

@timholy
Copy link
Contributor

timholy commented Nov 14, 2016

(OEP = Optim Enhancement Proposal) Rather than keeping track of f_calls and g_calls in the algorithm, it seems much cleaner to have DifferentiableFunction store these quantities, and every time you call value(d, x) and gradient!(g, d, x) the counters get updated. That way there is no chance you're not keeping track of each evaluation (e.g., #219).

@pkofod
Copy link
Member

pkofod commented Nov 15, 2016

I agree, and I know others do as well. We've had other suggestions for value and gradient!, but I actually like both.

@pkofod
Copy link
Member

pkofod commented Nov 16, 2016

I'd throw my time after this asap (as in asap, not open source work asap), but (and correct me if I'm mistaken) I've seen @johnmyleswhite oppose something similar earlier. Any opinions? If I remember correctly, you said you wanted to go in the opposite direction API wise. Care to elaborate? Or correct me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants