MLS-C01 Question 153
Select 3You are training a machine learning model to classify images of animals using SageMaker. The dataset contains millions of high-resolution images stored in an S3 bucket. During training, you notice that the training job is taking an unexpectedly long time to complete. Which of the following actions could help improve the training speed while maintaining model accuracy?
- A
Use SageMaker Pipe mode to stream data directly from S3 during training instead of fully downloading the dataset to the training instance.
- B
Switch to a smaller instance type to reduce the computational cost of the training job.
- C
Perform data augmentation to artificially expand the dataset with transformed images.
- D
Use Amazon SageMaker distributed training to parallelize computations across multiple instances.
- E
Convert the dataset into the RecordIO or TFRecord format for faster data loading.
Show answer and explanation
Correct answers: A, D, E
Explanation
To improve training speed, you can optimize data input/output operations and leverage distributed training. SageMaker Pipe mode streams data directly from S3, avoiding delays caused by downloading the dataset. Distributed training allows you to parallelize the workload across multiple instances, reducing training time. Converting the dataset into efficient formats like RecordIO or TFRecord minimizes data loading bottlenecks. These approaches enhance training efficiency without compromising model accuracy.
- A. Correct.
Using SageMaker Pipe mode allows data to be streamed directly from S3, reducing the time spent downloading the dataset to the training instance and speeding up training.
- B. Incorrect.
Switching to a smaller instance type would reduce costs but would likely slow down training due to reduced computational resources.
- C. Incorrect.
Data augmentation can improve model generalization but does not directly impact training speed.
- D. Correct.
Using SageMaker distributed training can parallelize computations across multiple instances, significantly improving training speed for large datasets or complex models.
- E. Correct.
Converting the dataset into the RecordIO or TFRecord format optimizes data loading and speeds up the training process, especially for large datasets.