This chapter covers:
- working through an image recognition problem, step by step
- building a feed forward neural network to classify images
- loading data using Datasets and DataLoaders
- why and how to use a classification loss
- describing how convolution works
- building a convolutional neural network to classify images
The last chapter gave us the opportunity to dive into the inner mechanics of learning through gradient descent, and the facilities that PyTorch offers to build models and optimize them. We have done so on a simple regression model of one input and one output, which allowed us to have everything in plain sight, but admittedly was only borderline exciting.
In this chapter we’ll keep moving ahead on building our neural network foundations. This time, we’ll turn our attention to images. Image recognition is arguably the task that made the world realize the potential of deep learning.
We will now approach a simple image recognition problem step by step, building from a simple neural network like we defined in the last chapter. This time, instead of a tiny dataset of numbers, we’ll use a more extensive dataset of tiny images. Let’s download the dataset first and get to work preparing it for use.