Google Cloud Professional Machine Learning Engineer — Question 111
You are developing an ML model intended to classify whether X-ray images indicate bone fracture risk. You have trained a ResNet architecture on Vertex AI using a TPU as an accelerator, however you are unsatisfied with the training time and memory usage. You want to quickly iterate your training code but make minimal changes to the code. You also want to minimize impact on the model’s accuracy. What should you do?
Answer options
- A. Reduce the number of layers in the model architecture.
- B. Reduce the global batch size from 1024 to 256.
- C. Reduce the dimensions of the images used in the model.
- D. Configure your model to use bfloat16 instead of float32.
Correct answer: D
Explanation
The correct answer is D because using bfloat16 reduces memory usage and can speed up training without significantly affecting model accuracy. Options A and C involve altering the model architecture and input data, which could harm accuracy. Option B reduces the global batch size, but this may not provide the same benefits in terms of memory efficiency as switching to bfloat16.