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

Provide rrules for collect

Open Keno opened this issue 4 years ago • 0 comments

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)

Keno avatar Jul 30 '21 14:07 Keno