MLUtils.jl icon indicating copy to clipboard operation
MLUtils.jl copied to clipboard

The fallback result of `batch` over `AbstractArray{<:Number}`

Open findmyway opened this issue 3 years ago • 1 comments

julia> x = rand(2,3,4);

julia> batch(x) |> size
(24,)

It seems batch flatten the array here. I think it would make more sense to keep the array as it is here?

batch(x::AbstractArray{<:Number}) = x

Or at least keep the original size?

findmyway avatar May 25 '22 04:05 findmyway

I think this should error, unless x is a vector

CarloLucibello avatar Jan 01 '23 13:01 CarloLucibello