Read 4000 Imgs
unknown
julia
3 years ago
478 B
8
Indexable
using FileIO, Images
const paths::Vector{String} = readdir(
raw"<PATH>\TinyMNIST\train"; join=true
)
function ret400(paths::Vector{String})::Matrix{Float64}
reduce(hcat, _ret400.(paths))
end
function _ret400(path::String)::Matrix{Float64}
set1::Vector{String} = readdir(path; join=true);
b::Vector{Matrix{Float64}} = [Float64.(x) for x=FileIO.load.(set1)]
c::Vector{Vector{Float64}} = [vec(reshape(x, :, 1)) for x=b]
reduce(hcat, c)
end
ret400(paths)Editor is loading...