Array dimensions don't match

Hello, I used
x, y =MNIST.testdata()
and then did this
“x = (x .- mean(x,dims = 2)) / std(x .- mean(x,dims = 2))”
And I get 282810000 Array{Float64, 3}.
But actually I need an Array 784*10000, which means this should be a 2 dimensional array with 10000 entries, each entry is a 1 dimensional array with 784 elements…
what can I do? Thanks in advance!

The x that is read is 28 * 28 * 10000. I’m not entirely sure what you want but perhaps replacing x with reshape( x, 784, 10000 ) right after loading does the trick?

1 Like

Thanks! It worked!

1 Like