File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 3131
3232@adjoint function getindex (VA:: AbstractVectorOfArray , i:: AbstractArray{Int} )
3333 function AbstractVectorOfArray_getindex_adjoint (Δ)
34- @show " in hete at vecint"
3534 iter = 0
3635 Δ′ = [(j ∈ i ? Δ[iter += 1 ] : FillArrays. Fill (zero (eltype (x)), size (x)))
3736 for (x, j) in zip (VA. u, 1 : length (VA))]
7877 ArrayPartition (x, Val{copy_x}), ArrayPartition_adjoint
7978end
8079
81- # @adjoint function VectorOfArray(u)
82- # VectorOfArray(u),
83- # y -> begin
84- # y isa Ref && (y = VectorOfArray(y[].u))
85- # (VectorOfArray([y[ntuple(x -> Colon(), ndims(y) - 1)..., i]
86- # for i in 1:size(y)[end]]),)
87- # end
88- # end
80+ @adjoint function VectorOfArray (u)
81+ VectorOfArray (u),
82+ y -> begin
83+ y isa Ref && (y = VectorOfArray (y[]. u))
84+ (VectorOfArray ([y[ntuple (x -> Colon (), ndims (y) - 1 )... , i]
85+ for i in 1 : size (y)[end ]]),)
86+ end
87+ end
8988
9089@adjoint function Base. copy (u:: VectorOfArray )
9190 copy (u),
You can’t perform that action at this time.
0 commit comments