MNIST Handwritten Digits Classifier form inference help


Can someone tell me the correct format for testing images with the MNIST Handwritten Digits Classifier project? I created a 28x28 png image but it errors out,

ValueError('Error when checking : expected Input_1 to have shape (None, 1, 28, 28) but got array with shape (1, 4, 28, 28)',)

I also took an image from the test data, modified it, and re-saved it - to get the same error.


Your PNG image file has 4 channels (Alpha + RGB) while your network expects a grayscale image (1 channel). You need to find a way to convert the image into a grayscale image.