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 ac63cf6 commit 450848fCopy full SHA for 450848f
src/batchs.jl
@@ -22,9 +22,9 @@ 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})
25
- field = reduce(x) do a, b
26
- @info "vals" a b
27
- cat(a.field, b.field; dims=ndims(a.field))
+ field = mapreduce((a,b) ->cat(a.field, b.field; dims=ndims(a.field)), x) do a
+ @info "vals" a
+ a.field
28
29
offsets = vcat([0], getfield.(x, :lengths) .|> last)::Vector{Int} |> cumsum |> DropLast(1)
30
lengths = vcat([0], reduce(vcat,
0 commit comments