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 31
31
32
32
@adjoint function getindex (VA:: AbstractVectorOfArray , i:: AbstractArray{Int} )
33
33
function AbstractVectorOfArray_getindex_adjoint (Δ)
34
- @show " in hete at vecint"
35
34
iter = 0
36
35
Δ′ = [(j ∈ i ? Δ[iter += 1 ] : FillArrays. Fill (zero (eltype (x)), size (x)))
37
36
for (x, j) in zip (VA. u, 1 : length (VA))]
78
77
ArrayPartition (x, Val{copy_x}), ArrayPartition_adjoint
79
78
end
80
79
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
89
88
90
89
@adjoint function Base. copy (u:: VectorOfArray )
91
90
copy (u),
You can’t perform that action at this time.
0 commit comments