CIFAR-10 dataset
Load the CIFAR-10 small images classification dataset from https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz. The CIFAR-10 dataset is made up of 60,000 32 x 32 color images in 10 classes, and there are 6000 images per class. The dataset consists of 50,000 training images and 10,000 test images.
The dataset has been divided into five training batches and one test batch, each with 10,000 images. The test batch contains 1,000 randomly selected images from each class. The training batches contain the rest of the images in a random order; some training batches may contain more images from one class than another. The training batches contain 5,000 images from each class, such as shown in the following image:
Reference: https://www.cs.toronto.edu/~kriz/cifar.html.
How to do it...
Let's load this dataset using the Keras APIs and print the shape and size:
from keras.datasets import cifar10
(X_train, y_train), (X_test, y_test) = cifar10.load_data()
print("X_train shape: " + str...