Added back for multi-parameter vcat
This commit is contained in:
parent
41f3eedc39
commit
7e51418679
@ -39,10 +39,13 @@ Base.vcat(a::TrackedMatrix, b::TrackedMatrix) = TrackedArray(Call(vcat, a, b))
|
|||||||
Base.vcat(a::TrackedMatrix, b::AbstractMatrix) = TrackedArray(Call(vcat, a, b))
|
Base.vcat(a::TrackedMatrix, b::AbstractMatrix) = TrackedArray(Call(vcat, a, b))
|
||||||
Base.vcat(a::AbstractMatrix, b::TrackedMatrix) = TrackedArray(Call(vcat, a, b))
|
Base.vcat(a::AbstractMatrix, b::TrackedMatrix) = TrackedArray(Call(vcat, a, b))
|
||||||
|
|
||||||
function back(::typeof(vcat), Δ, xs, ys)
|
function back(::typeof(vcat), Δ, xs...)
|
||||||
i = Base.tail(map(_ -> :, size(Δ)))
|
i = Base.tail(map(_ -> :, size(Δ)))
|
||||||
@back(xs, Δ[1:size(xs,1), i...])
|
start = 0
|
||||||
@back(ys, Δ[size(xs,1)+1:end, i...])
|
for xsi in xs
|
||||||
|
@back(xsi, Δ[start+1:start+size(xsi,1), i...])
|
||||||
|
start += size(xsi, 1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Reductions
|
# Reductions
|
||||||
|
Loading…
Reference in New Issue
Block a user