Error using image: Error when checking input: expected dense_56_input to have 2 dimensions, but got array with shape
The error occurs due to mismatch in the input shape. In the model you have specified it as input_shape = (784,) but the actual images that the model is getting as input are of different size. Just put the input shape as input_shape = (32, 32, 3) and you are good to go. Take a look here for more details on how to specify the input_shape.

Also, you'll have to use convolutional layers to process images or you can use a flatten layer before using dense layers!