-
Notifications
You must be signed in to change notification settings - Fork 3
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
A unified interface instead of the current naming convention dispatching on functions. #38
Comments
Good idea. I would prefer, though, a design more similar to https://github.com/JuliaFirstOrder/ProximalOperators.jl : gradient(M, FixArg2(distance, q), p) # gradient of distance(M, p, q) as a functions p -> X /in TpM)
gradient!(M, FixArg2(distance, q), X, p) # the previous evaluated in-place of X and also differential(M, FixArg1(exp, q), X, Y) # replacement for differential_exp_argument
differential(M, FixArg2(exp, X), p, Y) # replacement for differential_exp_basepoint Maybe just with better names than Note also https://juliadiff.org/ChainRulesCore.jl/stable/ , though they are interested in computing differentials wrt. all inputs at once. |
That sounds good. Yeah. I think we should think about the naming a bit, but I like the idea, mine was more like ad-hoc and the parameters kwarg is also really not a good idea ;) Could we also have |
Cool. Sure, we can have a generic |
That might be better, I was thinking of that as well already when you have the retraction method or such involved. To use that with grad/prox/diff one could go for
of course the 2 is a bit relative if we do not count M as an argument for example. And maybe providing the others (like |
Thinking about the naming a bit, I think I like the last one proposed here indeed – I am just not sure how to realise both the struct ( |
As an improvement of #17 even, we should introduce a better interface for gradient, differential, Jacobin, Hessian and proximal map (also partly discussed in #37).
Proposal of an interface
Any of the interface functions should have as first argument the manifold, as second the function it provides the diff for, if no further argument is provided, a function is returned, if a third – point – is provided, the prox/gradient /Jacobian is evaluatioed, for the Differential, its Adjoint or the Hessian, one further argument would be necessary.
The same holds for the in-place variants.
The implementation should be changed to use these interfaces instead of the current (little clumsy) naming scheme. Maybe this is best explained in examples.
Examples
where one open points would be to discuss a good interface for parameters like the fixed value q (or geodesic parameters in the derivative and such).
The text was updated successfully, but these errors were encountered: