Open
Description
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,), rand(3,)
Zygote.gradient(() -> sum(first(zip(x, y)))) # works
Zygote.gradient(() -> sum(map(_ -> 1.0, (x, y)))) # works
Zygote.gradient(() -> sum(map(_ -> 1.0, zip(x, y)))) # errors Need an adjoint for constructor Base.Iterators.Zip{Tuple{Vector{Float64}, Vector{Float64}}}
Anyway, it looks like zip
is missing from CR.