You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for all your work on ChainRules, it is shaping up to be very useful.
I recently wrote my first frule/rrule for some (scalar) function, without using the @scalar_rule macro.
It worked fine for 1D case, but I noticed it did not work with broadcasting (as in, my custom rules were never used).
Is there a straighforward way of getting custom rules to play nicely with broadcasting, or did I miss something obvious?
It might be worth adding something to the docs regarding this, since broadcasting seems to be central Julia concept.
Many thanks!
The text was updated successfully, but these errors were encountered:
Assuming you mean Zygote, its broadcasting at present prefers to use ForwardDiff internally, if possible. Thus it will not see rules defined using either Zygote itself, or using anything from ChainRules.
This is not well documented, unfortunately. Partly because it's not so clear what the best strategy is. @scalar_rule now defines also derivatives_using_output which should be useful for handling broadcasting.
Hello all,
Thank you for all your work on ChainRules, it is shaping up to be very useful.
I recently wrote my first
frule
/rrule
for some (scalar) function, without using the@scalar_rule
macro.It worked fine for 1D case, but I noticed it did not work with broadcasting (as in, my custom rules were never used).
Is there a straighforward way of getting custom rules to play nicely with broadcasting, or did I miss something obvious?
It might be worth adding something to the docs regarding this, since broadcasting seems to be central Julia concept.
Many thanks!
The text was updated successfully, but these errors were encountered: