Google Professional Machine Learning Engineer Question 337
Single answerGoogle Cloud PlatformYou are designing a machine learning pipeline to train a deep learning model for image classification using TensorFlow. The dataset contains millions of high-resolution images, and the training process requires significant matrix computations. You want to minimize training time while optimizing cost. Which hardware type should you choose?
- A
CPU
- B
GPU
- C
TPU
- D
Edge device
Show answer and explanation
Correct answer: C
Explanation
For training deep learning models on massive datasets with TensorFlow, TPUs provide the best performance and cost efficiency. They are specifically optimized for large-scale matrix computations, which are common in deep learning tasks. While GPUs are also effective, TPUs are generally faster and more cost-efficient for TensorFlow workloads. CPUs and edge devices are not well-suited for this scenario due to their limited computational capabilities.
- A. Incorrect.
CPUs are general-purpose processors and are not optimized for the parallelized computations required in deep learning. While they can be used, they would result in significantly longer training times for such a large dataset.
- B. Incorrect.
GPUs are designed for parallelized computations and are commonly used for deep learning tasks. However, for TensorFlow models and very large datasets, TPUs often provide even better performance and cost efficiency.
- C. Correct.
TPUs (Tensor Processing Units) are custom hardware designed by Google specifically for TensorFlow workloads. They are highly optimized for deep learning tasks involving large-scale matrix computations and can significantly reduce training time while being cost-effective for such scenarios.
- D. Incorrect.
Edge devices are designed for deploying models for inference close to the user. They are not suitable for training large-scale deep learning models due to limited computational resources.