fix mnist loader
This commit is contained in:
parent
86683e5991
commit
216d278e7b
|
@ -11,6 +11,8 @@ function __init__()
|
|||
end
|
||||
|
||||
include("mnist.jl")
|
||||
export MNIST
|
||||
|
||||
include("cmudict.jl")
|
||||
using .CMUDict
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ function labelheader(io::IO)
|
|||
end
|
||||
|
||||
function rawimage(io::IO)
|
||||
img = Array{Gray}(NCOLS, NROWS)
|
||||
img = Array{Gray}(undef, NCOLS, NROWS)
|
||||
for i in 1:NCOLS, j in 1:NROWS
|
||||
img[i, j] = reinterpret(Colors.N0f8, read(io, UInt8))
|
||||
end
|
||||
|
|
|
@ -6,3 +6,6 @@ using Test
|
|||
@test length(CMUDict.phones()) == 39
|
||||
|
||||
@test length(CMUDict.symbols()) == 84
|
||||
|
||||
@test MNIST.images()[1] isa Matrix
|
||||
@test MNIST.labels() isa Vector{Int64}
|
||||
|
|
Loading…
Reference in New Issue