Skip to content

Rules for zip missing  #507

Open
@AlexRobson

Description

@AlexRobson

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions