Skip to content

Commit 90b514e

Browse files
committed
fix:
1 parent c4a97b9 commit 90b514e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/batchs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function ConcatenatedBatch((; field)::Batch)
2222
ConcatenatedBatch(cat(field; dims=ndims(field)), vcat([0], field .|> size .|> last |> cumsum))
2323
end
2424
function stack_ConcatenatedBatch(x::AbstractVector{<:ConcatenatedBatch})
25-
field = reduce(x -> cat(x, dims=ndims(first(x).field)),getfield.(x, :field))
25+
field = reduce((x,y) -> cat(x,y; dims=ndims(first(x).field)),getfield.(x, :field))
2626
offsets = vcat([0], getfield.(x, :lengths) .|> last)::Vector{Int} |> cumsum |> DropLast(1)
2727
lengths = vcat([0], reduce(vcat,
2828
zip(getfield.(x, :lengths) |> Map(Drop(1)), offsets) |> Map(((lengths, offset),) -> lengths .+ offset)

0 commit comments

Comments
 (0)