Google Professional Machine Learning Engineer Question 336
Select 2Google Cloud PlatformYou are designing a machine learning pipeline for a deep learning model that involves training on a large image dataset. The model includes convolutional layers and requires significant matrix computations. The pipeline also involves a preprocessing step for resizing and normalizing images, and the final deployment will be made on an edge device for real-time inference. Which hardware configuration should you choose to optimize training and deployment costs while maintaining performance?
- A
Use GPUs for training and CPUs for preprocessing and edge deployment.
- B
Use TPUs for training and GPUs for preprocessing and edge deployment.
- C
Use CPUs for training, preprocessing, and edge deployment.
- D
Use GPUs for training and preprocessing, and CPUs for edge deployment.
- E
Use TPUs for training, CPUs for preprocessing, and GPUs for edge deployment.
Show answer and explanation
Correct answers: A, D
Explanation
To optimize both costs and performance, GPUs are well-suited for training deep learning models due to their parallel processing capability. For preprocessing, CPUs are sufficient as these tasks are less computationally intensive. For edge deployment, CPUs are typically preferred due to their cost-effectiveness and ability to handle real-time inference on lightweight models, making the combination of GPUs for training and preprocessing with CPUs for edge deployment the best choice.
- A. Correct.
GPUs are highly optimized for training deep learning models, especially those involving convolutional layers, due to their massive parallel processing capabilities. CPUs are sufficient for preprocessing tasks and edge deployment, where computational demands are lower.
- B. Incorrect.
TPUs are powerful for deep learning tasks but are generally more cost-effective for large-scale training tasks. Using GPUs for edge deployment may not align with real-time and cost optimization needs on edge devices.
- C. Incorrect.
CPUs are not suitable for training deep learning models with heavy computational requirements. While they can handle preprocessing and edge deployment, they are not ideal for training tasks.
- D. Correct.
GPUs are excellent for both training and preprocessing tasks that involve parallelizable operations like matrix computations and image transformations, while CPUs are cost-effective and sufficient for edge deployment.
- E. Incorrect.
TPUs are an excellent choice for training deep learning models but are not ideal for preprocessing tasks, which do not typically require the same level of specialized hardware. Using GPUs for edge deployment is unnecessary and may increase costs without significant performance gains.