We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14e3e11 commit 58182c3Copy full SHA for 58182c3
src/zygote.jl
@@ -19,7 +19,7 @@ function ChainRulesCore.rrule(::Type{<:ArrayPartition}, x::S, ::Type{Val{copy_x}
19
function ArrayPartition_adjoint(_y)
20
y = Array(_y)
21
starts = vcat(0,cumsum(reduce(vcat,length.(x))))
22
- NoTangent(), ArrayPartition(ntuple(i -> reshape(y[starts[i]+1:starts[i+1]], size(x[i]))), length(x)), NoTangent()
+ NoTangent(), ArrayPartition(ntuple(i -> reshape(y[starts[i]+1:starts[i+1]], size(x[i])), length(x))), NoTangent()
23
end
24
25
ArrayPartition(x, Val{copy_x}), ArrayPartition_adjoint
0 commit comments