Performing inference through Batch Transform

In this section, we will classify (in batch mode) a few images that form part of the test dataset. Since we want to classify more than one image at a time, we will create a Batch Transform job. Please refer to Chapter 8, Creating Machine Learning Inference Pipelines, to learn about when and where Batch Transform jobs are used and how they work.

Before we create a Batch Transform job, we need to provision the trained model.

In the following code snippet, we are going to do the following:

  1. We will create a trained model by calling the create_model() function of the SageMaker service (boto3, the AWS SDK for Python, is used to provision a low-level interface to the SageMaker service).
  2. We will pass ...

Get Hands-On Artificial Intelligence on Amazon Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.