Closed CheukHinHoJerry closed 1 year ago
Hi guys - thank you for this PR. I've started reviewing. My first big comment is this : your implementation of evaluate_ed
and evaluate_ed2
doesn't correspond to how those functions are specified. What you implemented there are frule
implementations if I'm not mistake???. I actually think these are really important and I'm very keen to have them, but we need to find a different name for them.
also, we do need the actual implementations of evaluate_ed
and evaluate_ed2
as well.
regarding naming, what about
_frule_evaluate(...)
_frule_frule_evaluate(...)
the underscore in _frule...
indicates that these are private functions. We don't need them to be private, but my thinking is that these are just backends / kernels for an frule
method that overloads the ChainRules.frule
.
What do you think?
the other point to mention is that it would be good to use the generic interface for the allocating versions of the evaluation functions + the @reqfields
macro...
Hi guys - thank you for this PR. I've started reviewing. My first big comment is this : your implementation of
evaluate_ed
andevaluate_ed2
doesn't correspond to how those functions are specified. What you implemented there arefrule
implementations if I'm not mistake???. I actually think these are really important and I'm very keen to have them, but we need to find a different name for them.also, we do need the actual implementations of
evaluate_ed
andevaluate_ed2
as well.
Now I realize that the implementation here is indeed not evaluate_ed and evaluate_ed2. Thank you for pointing that out. I will rename these functions and provide the actual implementations of evaluate_ed and evaluate_ed2.
regarding naming, what about
_frule_evaluate(...) _frule_frule_evaluate(...)
the underscore in
_frule...
indicates that these are private functions. We don't need them to be private, but my thinking is that these are just backends / kernels for anfrule
method that overloads theChainRules.frule
.What do you think?
These names sound great. I will double-check the existing code to confirm if the functions were originally intended to be frule implementations, and then I will rename them as you suggested!
the other point to mention is that it would be good to use the generic interface for the allocating versions of the evaluation functions + the
@reqfields
macro...
I will coordinate with @DexuanZhou and modify the new functions correspondingly.
I will double-check the existing code to confirm if the functions were originally intended to be frule implementations,
Yes, please double-check this, I am just guessing :)
Thinking again about renaming those functions. Since we call the rrules a pullback we should maybe call the frules a pushforward. or at least treat them consistently. Because these codes are not true f/rrules as they only do the differentiation w.r.t. the input I probable prefer the following:
_pbkX_evaluate(...)
_fwdX_evaluate(...)
or some variant on this: i.e. pullback and pushforward w.r.t. to the input variable X only. Please suggest alternative names
close this since it is included in #39
This branch implements:
Some of the functionalities are not complete but it is sufficient for bf in ACEpsi. @DexuanZhou and I are cloning this branch and dev it locally. No urgent merging it before everything is done nicely I think.
cc @cortner