JuliaML / MLUtils.jl

Utilities and abstractions for Machine Learning tasks
MIT License
107 stars 20 forks source link

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

Open findmyway opened 2 years ago

findmyway commented 2 years ago
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?

CarloLucibello commented 1 year ago

I think this should error, unless x is a vector