Skip to Content
Practical Machine Learning for Computer Vision
book

Practical Machine Learning for Computer Vision

by Valliappa Lakshmanan, Martin Görner, Ryan Gillard
July 2021
Intermediate to advanced
480 pages
12h 44m
English
O'Reilly Media, Inc.
Book available
Content preview from Practical Machine Learning for Computer Vision

Chapter 7. Training Pipeline

The stage after preprocessing is model training, during which the machine learning model will read in the training data and use that data to adjust its weights (see Figure 7-1). After training, the model is saved or exported so that it can be deployed.

Figure 7-1. In the model training process, the ML model is trained on preprocessed data and then exported for deployment. The exported model is used to make predictions.

In this chapter, we will look at ways to make the ingestion of training (and validation) data into the model more efficient. We will take advantage of time slicing between the different computational devices (CPUs and GPUs) available to us, and examine how to make the whole process more resilient and reproducible.

Tip

The code for this chapter is in the 07_training folder of the book’s GitHub repository. We will provide file names for code samples and notebooks where applicable.

Efficient Ingestion

A significant part of the time it takes to train machine learning models is spent on ingesting data—reading it and transforming it into a form that is usable by the model. The more we can do to streamline and speed up this stage of the training pipeline, the more efficient we can be. We can do this by:

Storing data efficiently

We should preprocess the input images as much as possible, and store the preprocessed values in a way that is ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Deep Learning for Computer Vision

Deep Learning for Computer Vision

Rajalingappaa Shanmugamani
PyTorch for Deep Learning and Computer Vision

PyTorch for Deep Learning and Computer Vision

Rayan Slim, Jad Slim, Amer Abdulkader, Sarmad Tanveer
Kubeflow for Machine Learning

Kubeflow for Machine Learning

Trevor Grant, Holden Karau, Boris Lublinsky, Richard Liu, Ilan Filonenko

Publisher Resources

ISBN: 9781098102357Errata PageSupplemental Content