ChainRules.jl
ChainRules.jl copied to clipboard
Provide rrules for collect
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)