Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Google Professional Machine Learning Engineer Exam - Topic 3 Question 88 Discussion

Posted by Willie on Sep 15, 2024 at 07:14 AM

You need to train a computer vision model that predicts the type of government ID present in a given image using a GPU-powered virtual machine on Compute Engine. You use the following parameters:

* Optimizer: SGD

* Image shape 224x224

* Batch size 64

* Epochs 10

* Verbose 2

During training you encounter the following error: ResourceExhaustedError: out of Memory (oom) when allocating tensor. What should you do?

Suggested Answer: D

The best option to minimize storage and computational overhead is to use the TRANSFORM clause in the CREATE MODEL statement in the SQL query to calculate the required statistics. The TRANSFORM clause allows you to specify feature preprocessing logic that applies to both training and prediction. The preprocessing logic is executed in the same query as the model creation, which avoids the need to create and store intermediate tables. The TRANSFORM clause also supports quantile bucketization and MinMax scaling, which are the preprocessing steps required for this scenario. Option A is incorrect because creating a component in the Vertex AI Pipelines DAG to calculate the required statistics may increase the computational overhead, as the component needs to run separately from the model creation. Moreover, the component needs to pass the statistics to subsequent components, which may increase the storage overhead. Option B is incorrect because preprocessing and staging the data in BigQuery prior to feeding it to the model may also increase the storage and computational overhead, as you need to create and maintain additional tables for the preprocessed data. Moreover, you need to ensure that the preprocessing logic is consistent for both training and inference. Option C is incorrect because creating SQL queries to calculate and store the required statistics in separate BigQuery tables may also increase the storage and computational overhead, as you need to create and maintain additional tables for the statistics. Moreover, you need to ensure that the statistics are updated regularly to reflect the new data.Reference:

BigQuery ML documentation

Using the TRANSFORM clause

Feature preprocessing with BigQuery ML


Get Premium Professional Machine Learning Engineer Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
37 comments · newest first
AN
Andra 11 months ago
Lowering the learning rate might help too, but batch size is key.
ER
Ernie 11 months ago
Wait, can you really just change the image shape? Seems risky!
SH
Shantell 11 months ago
Changing the optimizer won't help with memory issues.
LI
Lisha 11 months ago
I agree, batch size is usually the first thing to try!
OD
Odette 12 months ago
Just reduce the batch size to 32 or 16.
GL
Glendora 12 months ago
I feel like adjusting the learning rate could be useful, but I'm not confident it would solve the out of memory problem. Batch size seems more straightforward.
VE
Vernell 1 year ago
I practiced a similar question where reducing the image size helped with memory errors. So, maybe option D could be a valid approach too?
SH
Sharen 1 year ago
I'm not entirely sure, but I think changing the optimizer might not directly address the memory issue. It seems more related to resource allocation.
BI
Billy 1 year ago
I remember we discussed how batch size can significantly impact memory usage during training. Reducing it might help with the out of memory error.
BE
Ben 1 year ago
I'm feeling pretty confident about this one. The out of memory error is clearly a resource issue, so reducing the batch size is the logical solution. I'll make sure to try that first.
MA
Maryln 1 year ago
Ah, I've seen this kind of issue before. Reducing the batch size is definitely the way to go. That should free up enough memory to get the training running smoothly.
EN
Enola 1 year ago
Okay, I'm a bit confused here. The error message mentions running out of memory, but I'm not sure if changing the optimizer or learning rate would really help with that. I might try reducing the image shape instead.
MO
Mona 1 year ago
Hmm, this looks like a tricky one. I think I'll try reducing the batch size first - that seems like the most straightforward way to address the out of memory error.
AD
Adelina 1 year ago
I think the Network Testing Companion is a good solution to identify the network packet loss during the Teams calls. It's a straightforward approach that should give us the data we need.
SY
Sylvie 1 year ago
Alright, who's the genius that chose a 224x224 image shape for a GPU-powered VM? That's like trying to fit a monster truck in a Smart car!
XE
Xenia 1 year ago
↳ replying to Sylvie
C) Change the learning rate
AN
Annamae 1 year ago
↳ replying to Sylvie
B) Reduce the batch size
TH
Thaddeus 1 year ago
↳ replying to Sylvie
A) Change the optimizer
LI
Lindsey 1 year ago
Hmm, 'out of Memory' error? Looks like someone's been skipping their GPU diet. Time to go on a batch size reduction binge!
GA
Gaston 1 year ago
↳ replying to Lindsey
D) Reduce the image shape
SH
Shawnta 1 year ago
↳ replying to Lindsey
C) Change the learning rate
FL
Fletcher 1 year ago
↳ replying to Lindsey
B) Reduce the batch size
GA
Gayla 1 year ago
↳ replying to Lindsey
A) Change the optimizer
MA
Mammie 2 years ago
Changing the learning rate? I don't think that's going to help with the OOM error. Gotta free up that GPU memory, my friend.
RE
Reita 2 years ago
I would try reducing the image shape first. Smaller input size means less memory required for the model, and you can always resize the images later.
TH
Thad 2 years ago
Reducing the batch size seems like the obvious choice here. Too large a batch can easily exhaust GPU memory, especially with high-resolution images.
GA
Garry 1 year ago
↳ replying to Thad
Changing the learning rate could also potentially help with memory management.
LA
Laurel 1 year ago
↳ replying to Thad
C) Change the learning rate
NO
Norah 1 year ago
↳ replying to Thad
Yes, reducing the batch size is a common solution to memory errors during training.
VA
Val 1 year ago
↳ replying to Thad
B) Reduce the batch size
BU
Bulah 1 year ago
↳ replying to Thad
I think changing the optimizer might also be worth trying to optimize memory usage.
LI
Lisbeth 1 year ago
↳ replying to Thad
A) Change the optimizer
TI
Tijuana 1 year ago
↳ replying to Thad
That's a good point, reducing the batch size should help with the memory issue.
EV
Evelynn 1 year ago
↳ replying to Thad
B) Reduce the batch size
PA
Paris 2 years ago
I think changing the optimizer might also help in resolving the memory error.
MA
Margurite 2 years ago
I agree with Casey, reducing the batch size should help with the memory issue.
CA
Casey 2 years ago
I think we should reduce the batch size.
0/2000 characters

Save Cancel