The SageMaker models that you have trained are now available to be used to predict objects in images. As we discussed at the beginning of the chapter, SageMaker offers a marketplace where you can use many models directly to perform your tasks:
- Since we trained our own machine learning model, we will have to create a SageMaker model that can be used for predictions. The following code shows you how to generate a usable model in Amazon Sagemaker:
import boto3 from time import gmtime, strftime sage = boto3.Session().client(service_name='sagemaker') model_name="example-full-image-classification-model" info = sage.describe_training_job(TrainingJobName=job_name) model_data = info['ModelArtifacts']['S3ModelArtifacts'] hosting_image = get_image_uri(boto3.Session().region_name, 'image-classification...