Google Cloud Professional Data Engineer — Question 129
A TensorFlow machine learning model on Compute Engine virtual machines (n2-standard-32) takes two days to complete training. The model has custom TensorFlow operations that must run partially on a CPU. You want to reduce the training time in a cost-effective manner. What should you do?
Answer options
- A. Change the VM type to n2-highmem-32.
- B. Change the VM type to e2-standard-32.
- C. Train the model using a VM with a GPU hardware accelerator.
- D. Train the model using a VM with a TPU hardware accelerator.
Correct answer: C
Explanation
The correct answer is C because using a VM with a GPU hardware accelerator significantly speeds up training for TensorFlow models, especially those with custom operations. Options A and B may provide different resources, but they do not specifically enhance the training speed like a GPU would. Option D, while it could speed up training, may not be as cost-effective as using a GPU for the specific needs of the model.