How to give CIFAR-10 as an input to MLP
MNIST has 28x28 pixel greyscale images, so there are $28\times28 = 784$ features per image.

CIFAR10 contains colour images that are 32x32 pixels. At first glance it may seem like there are only $32\times32 = 1024$ features per image, but there are red, blue and green channels in the image, which means each image is actually $3\times32\times32 = 3072$ features. 

Usually, these channels are arranged as three separate 32x32 pixel images, rather than a single 32x32 image with RGB pixels. In keras, you can load the CIFAR10 dataset like so:

from keras.datasets import cifar10

(x_train, y_train), (x_test, y_test) = cifar10.load_data()


However, this will load the train and test dataset in the shape (num_samples, 3, 32, 32). In order to input these into an MLP, we need to flatten the channels and pixel arrays to form an array of shape (num_samples, 3072), just like with MNIST. We can do this in python like so:

x_train = x_train.reshape(-1, 3072)
x_test = x_test.reshape(-1, 3072)