Today we finish creating and deploying our own app. We discuss data augmentation, and look at the most important types of augmentation used in modern computer vision models. We also see how fastai helps you process your images to get them ready for your model.
We look at building GUIs, both for interactive apps inside notebooks, and also for standalone web applications. We discuss how to deploy web applications that incorporate deep learning models. In doing so, we look at the pros and cons of different approaches, such as server-based and edge-device deployment.
Our final area for productionization is looking at what can go wrong, and how to avoid problems, and keep your data product working effectively in practice.
Then we skip over to chapter 4 of the book, and learn about the underlying math and code of Stochastic Gradient Descent, which lies at the heart of neural network training.
Questionnaire
- What letters are often used to signify the independent and dependent variables?
- What's the difference between the crop, pad, and squish resize approaches? When might you choose one over the others?
- What is data augmentation? Why is it needed?
- What is the difference between
item_tfms
and batch_tfms
? - What is a confusion matrix?
- What does
export
save? - What is it called when we use a model for getting predictions, instead of training?
- What are IPython widgets?
- When might you want to use CPU for deployment? When might GPU be better?
- What are the downsides of deploying your app to a server, instead of to a client (or edge) device such as a phone or PC?
- What are three examples of problems that could occur when rolling out a bear warning system in practice?
- What is "out-of-domain data"?
- What is "domain shift"?
- What are the three steps in the deployment process?
- How is a grayscale image represented on a computer? How about a color image?
- How are the files and folders in the
MNIST_SAMPLE
dataset structured? Why? - Explain how the "pixel similarity" approach to classifying digits works.
- What is a list comprehension? Create one now that selects odd numbers from a list and doubles them.
- What is a "rank-3 tensor"?
- What is the difference between tensor rank and shape? How do you get the rank from the shape?
- What are RMSE and L1 norm?
- How can you apply a calculation on thousands of numbers at once, many thousands of times faster than a Python loop?
- Create a 3×3 tensor or array containing the numbers from 1 to 9. Double it. Select the bottom-right four numbers.
- What is broadcasting?
- Are metrics generally calculated using the training set, or the validation set? Why?
- What is SGD?
- Why does SGD use mini-batches?
- What are the seven steps in SGD for machine learning?
- How do we initialize the weights in a model?
- What is "loss"?
- Why can't we always use a high learning rate?
- What is a "gradient"?