Google Professional Machine Learning Engineer Question 270
Select 3Google Cloud PlatformYou are training a machine learning model on Google Cloud AI Platform, and the training job has failed. Upon reviewing the logs, you notice an 'Out of Memory' error during training. Which of the following steps should you take to troubleshoot and resolve the issue?
- A
Reduce the batch size used during training.
- B
Switch to a larger machine type with more memory.
- C
Enable model checkpointing to continue training from the last checkpoint.
- D
Optimize the model architecture to reduce its memory footprint.
- E
Increase the number of training epochs to reduce memory usage.
Show answer and explanation
Correct answers: A, B, D
Explanation
An 'Out of Memory' error during training typically indicates that the resources allocated to the training job are insufficient. To address this, you can either reduce memory usage by lowering the batch size or optimizing the model architecture, or you can increase available memory by switching to a larger machine type. These solutions directly address the root cause of the issue. Enabling checkpointing or increasing the number of epochs does not solve memory-related errors.
- A. Correct.
Reducing the batch size decreases the memory required per training step, often resolving 'Out of Memory' issues.
- B. Correct.
Switching to a larger machine type with more memory can handle models and datasets that require higher memory capacity.
- C. Incorrect.
While enabling model checkpointing is good practice, it does not directly address memory issues. This option is irrelevant in this scenario.
- D. Correct.
Optimizing the model architecture (e.g., using fewer layers or smaller layer sizes) can significantly reduce memory usage during training.
- E. Incorrect.
Increasing the number of training epochs does not reduce memory usage; in fact, it increases overall training time and resource consumption.