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:
- 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).
- We will pass a Docker image of the image classification algorithm and the path to the trained model to this function:
info = sage.describe_training_job(TrainingJobName...