Using the built-in CV algorithms
In this section, we're going to train and deploy models with all three algorithms using public image datasets. We will cover both training from scratch and transfer learning.
Training an image classification model
In this first example, let's use the image classification algorithm to build a model classifying the "Dogs vs. Cats" dataset that we prepared in a previous section. We'll first train using image format, and then using RecordIO format.
Training in image format
We will begin training using the following steps:
- In a Jupyter notebook, we define the appropriate data paths:
import sagemaker session = sagemaker.Session()bucket = session.default_bucket()prefix = 'dogscats-images' s3_train_path = 's3://{}/{}/input/train/'.format(bucket, prefix)s3_val_path = 's3://{}/{}/input/val/'.format(bucket, prefix) s3_train_lst_path = ...