So, i have a script that should convert a number into an array that i can feed into my AI. But a book that I am using for that tells me, to do so:
img_array = scipy.misc.imread("picofannumber.png", flatten = True)
img_data = 255.0 - img_array.reshape(784)
So, does not work, i guess my libraries are too outdated, because that does not work. So I am using this now:
img_array = imageio.imread("picofannumber.png", as_gray = True)
img_data = 255.0 - img_array.reshape(784)
But then my problem is:
ValueError: cannot reshape array of size 361928 into shape (784,)
I also tried
img_array = imageio.imread("picofannumber.png", as_gray = True)
img_data = 255.0 - img_array.reshape(28,28)
but it won't work either, same error.