ChainRules.jl icon indicating copy to clipboard operation
ChainRules.jl copied to clipboard

forward and reverse mode automatic differentiation primitives for Julia Base + StdLibs

Results 149 ChainRules.jl issues
Sort by recently updated
recently updated
newest added

Hey, I try to redefine `@scalar_rules` and some of the macros, to create the appropriate code for our symbolic derivation. I tried to google and understand the source code it...

I'm trying to work with the `Q` matrix from a qr-factorization within Zygote. In an incomplete QR factorization for m>=n, the `QRCompactWYQ`Matrix `Q` has `size=(m,m)` but only the first `n`...

Like https://github.com/JuliaDiff/ChainRules.jl/issues/154 I am pretty sure there is a generic rrule for constructors. Pretty sure I even wrote it down somewhere. It is something like ``` function rrule(::Type{T}, args...) where...

Probably this generalises to others in Base.Iterators Sometimes this works in Zygote and sometimes it doesn't - i haven't worked out what the difference is: ``` x, y = rand(3,),...

missing rule

Currently, rules for `*` are constrained to `CommutativeMulNumber` types. This is unnecessary, because only two numbers at a time are multiplied, so commutation is never needed. These constraints should be...

At least for `Tuple` and `Array`, it'd be useful to have, e.g.: ``` rrule(::typeof(collect), x::Tuple) = collect(x), dy -> (NoTangent(), Tuple(dy)) rrule(::typeof(collect), x::AbstractArray) = collect(x), dy -> (NoTangent(), dy) ```

missing rule

There are basically two reasons to implement rules: 1. to define AD. For example, you do have to tell an AD system _somewhere_ how to differentiate addition and multiplication of...

Similarly to https://github.com/JuliaDiff/ChainRules.jl/issues/408, `ZeroTangent()` is a valid input to the pullback, and we need to make sure it is supported. Using https://github.com/JuliaDiff/ChainRulesTestUtils.jl/pull/176, there are at least three kinds of errors:...

design
needs-careful-thought

There used to be a rrule for map, introduced here https://github.com/JuliaDiff/ChainRules.jl/pull/56, but I can't find it anymore. Related to https://github.com/FluxML/Zygote.jl/pull/842

missing rule

This is the outcome of a discussion I had with @KristofferC about how to make glue packages work. We should put it into practice for SpecialFunctions.jl and NaNMath.jl We make...