In this section, we'll use Keras to classify the images of the MNIST dataset. It's comprised of 70,000 examples of handwritten digits by different people. The first 60,000 are typically used for training and the remaining 10,000 for testing:
One of the advantages of Keras is that it can import this dataset for you without needing to explicitly download it from the web (it will download it for you):
- Our first step will be to download the datasets using Keras:
from keras.datasets import mnist
- Then, we need to import a few classes to use a feed-forward ...