PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #107
You are training an object detection machine learning model on a dataset that consists of three million X-ray images, each roughly 2 GB in size. You are using Vertex AI Training to run a custom traini
The correct answer is C. Enable early stopping in your Vertex AI Training job.. To decrease training time without sacrificing model performance for a long-running object detection model, enabling early stopping is an effective strategy to prevent unnecessary epochs.
Question
Options
- AIncrease the instance memory to 512 GB and increase the batch size.
- BReplace the NVIDIA P100 GPU with a v3-32 TPU in the training job.
- CEnable early stopping in your Vertex AI Training job.
- DUse the tf.distribute.Strategy API and run a distributed training job.
How the community answered
(47 responses)- A11% (5)
- B6% (3)
- C79% (37)
- D4% (2)
Why each option
To decrease training time without sacrificing model performance for a long-running object detection model, enabling early stopping is an effective strategy to prevent unnecessary epochs.
Increasing instance memory or batch size might help if the current setup is memory-bound or batch size is too small, but it's not a direct solution for generically long training times and might impact performance if not tuned correctly.
Replacing a GPU with a TPU is a significant hardware and potential code change that, while possibly increasing performance, is a more complex and costly solution than simply enabling an existing training job option.
Early stopping monitors a model's performance on a validation set and stops training once the performance no longer improves (or begins to degrade) for a certain number of epochs. This prevents overfitting and significantly reduces total training time by avoiding unproductive computations without sacrificing final model quality.
Using `tf.distribute.Strategy` for distributed training would decrease training time but requires modifying the training code, which adds complexity and is not as simple as enabling an option within the Vertex AI Training job configuration.
Concept tested: Training optimization techniques (early stopping)
Source: https://cloud.google.com/vertex-ai/docs/training/configure-job-options#custom_job_tensorboard_profiling_and_early_stopping
Topics
Community Discussion
No community discussion yet for this question.