-
-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Labels
ChainRulesadjoint -> rrule, and further integrationadjoint -> rrule, and further integration
Description
MWE (tested on v0.7.4):
julia> using Zygote
julia> foo1 = x->foldl(getindex, (1, 2), init=x)
#1 (generic function with 1 method)
julia> foo1_ref = x->getindex(getindex(x, 1), 2)
#3 (generic function with 1 method)
julia> v = [[1.1, 2.2]]
1-element Vector{Vector{Float64}}:
[1.1, 2.2]
julia> foo1(v) == foo1_ref(v) == 2.2
true
julia> Zygote.gradient(foo1_ref, v)
(ChainRules.OneElement{Float64, 1, Tuple{Int64}, Tuple{Base.OneTo{Int64}}}[[0.0, 1.0]],)
julia> Zygote.gradient(foo1, v)
(nothing,)
Metadata
Metadata
Assignees
Labels
ChainRulesadjoint -> rrule, and further integrationadjoint -> rrule, and further integration