Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
st-- committed Apr 14, 2022
1 parent 8e805ef commit 1a1b899
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/transform/transform.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Abstract type defining a transformation of the input.
"""
abstract type Transform end

# We introduce our own _map for Transform so that we can work around
# https://github.com/FluxML/Zygote.jl/issues/646 and define our own pullback
# (see zygoterules.jl)
Base.map(t::Transform, x::AbstractVector) = _map(t, x)
_map(t::Transform, x::AbstractVector) = t.(x)

Expand Down

0 comments on commit 1a1b899

Please sign in to comment.