Skip to content

Commit 450848f

Browse files
committed
fix:fix issue
1 parent ac63cf6 commit 450848f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/batchs.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ 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) do a, b
26-
@info "vals" a b
27-
cat(a.field, b.field; dims=ndims(a.field))
25+
field = mapreduce((a,b) ->cat(a.field, b.field; dims=ndims(a.field)), x) do a
26+
@info "vals" a
27+
a.field
2828
end
2929
offsets = vcat([0], getfield.(x, :lengths) .|> last)::Vector{Int} |> cumsum |> DropLast(1)
3030
lengths = vcat([0], reduce(vcat,

0 commit comments

Comments
 (0)