Skip to content

Commit c8afcd0

Browse files
chore: remove projection rule
1 parent 53cd1ae commit c8afcd0

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

ext/RecursiveArrayToolsZygoteExt.jl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -139,19 +139,19 @@ end
139139
view(A, I...), view_adjoint
140140
end
141141

142-
function ChainRulesCore.ProjectTo(a::AbstractVectorOfArray)
143-
ChainRulesCore.ProjectTo{VectorOfArray}((sz = size(a)))
144-
end
145-
146-
function (p::ChainRulesCore.ProjectTo{VectorOfArray})(x::Union{
147-
AbstractArray, AbstractVectorOfArray})
148-
if eltype(x) <: Number
149-
arr = reshape(x, p.sz)
150-
return VectorOfArray([arr[:, i] for i in 1:p.sz[end]])
151-
elseif eltype(x) <: AbstractArray
152-
return VectorOfArray(x)
153-
end
154-
end
142+
# function ChainRulesCore.ProjectTo(a::AbstractVectorOfArray)
143+
# ChainRulesCore.ProjectTo{VectorOfArray}((sz = size(a)))
144+
# end
145+
#
146+
# function (p::ChainRulesCore.ProjectTo{VectorOfArray})(x::Union{
147+
# AbstractArray, AbstractVectorOfArray})
148+
# if eltype(x) <: Number
149+
# arr = reshape(x, p.sz)
150+
# return VectorOfArray([arr[:, i] for i in 1:p.sz[end]])
151+
# elseif eltype(x) <: AbstractArray
152+
# return VectorOfArray(x)
153+
# end
154+
# end
155155

156156
@adjoint function Broadcast.broadcasted(::typeof(+), x::AbstractVectorOfArray,
157157
y::Union{Zygote.Numeric, AbstractVectorOfArray})

0 commit comments

Comments
 (0)