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 af555b1 commit 9739597Copy full SHA for 9739597
src/batchs.jl
@@ -21,7 +21,7 @@ end
21
function ConcatenatedBatch((; field)::Batch)
22
ConcatenatedBatch(cat(field; dims=ndims(field)), vcat([0], field .|> size .|> last |> cumsum))
23
end
24
-function stack_ConcatenatedBatch(x::AbstractVector{ConcatenatedBatch})
+function stack_ConcatenatedBatch(x::AbstractVector{<:ConcatenatedBatch})
25
field = cat(getfield.(x, :field), dims=ndims(first(x).field))
26
offsets = vcat([0], getfield.(x, :lengths) .|> last)::Vector{Int} |> cumsum
27
lengths = zip(getfield.(x, :lengths), offsets) |> Map((lengths, offset) -> lengths .+ offsets) |> vcat
0 commit comments