Building an image classifier with a neural network
We are back at our fictional company, and we want to use the intuition of neural networks to build an image classifier. Here, we are to teach computers to identify clothing. Thankfully, we do not need to find data in the wild; we have TensorFlow datasets that include the fashion dataset. In our case study, our aim is to classify a fashion dataset made up of 28 x 28 grayscale images into 10 classes (from 0 to 9) with pixel values between 0 and 255, using a well-known dataset called the Fashion MNIST dataset. This dataset is made up of 60,000 training images and 10,000 test images. Our dataset has all the images in the same shape, so we have little preprocessing to do. The idea here is for us to build a neural network quickly with little preprocessing complexities.
To train the neural network, we will pass the training images with the idea that our neural network will learn to map the images (X) to their corresponding labels (y)....