For a tuple primal @scalar_rule
returns a tuple (not a Composite) differential.
#211
Labels
rule definition helper
relating to helpers for declaring rules
Structural Tangent
Related to the `Tangent` type for structured (composite) values
With #163 we effectily decided that as far as we are concerned, julia only has single output functions.
in #163 we made the approprate changes for
rrules
which was that pullbacks need to take a single input, which might be aComposite{Tuple}
.But we have not made the change for forward mode, at least not consistently or to the
@scalar_rule
macro.An example (and possibly the only example) of this problem is:
We currently have
But we should have:
This should be changed in this section:
ChainRulesCore.jl/src/rule_definition_tools.jl
Lines 157 to 162 in 0fe9da8
This issiue becomes more pressing with #207 because that macro can't trivially know if a function is returnig multiple outputs, but if we say multiple outputs don't exist, then it is easy.
The text was updated successfully, but these errors were encountered: