Professional Machine Learning Engineer Practice Test

Professional Machine Learning Engineer Practice Test practice questions, page 7 of 15, with answer review and explanations.

Question 31

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 = 224ֳ—224 ✑ 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?

  1. Change the optimizer.
  2. Reduce the batch size.
  3. Change the learning rate.
  4. Reduce the image shape.

Question 32

You developed an ML model with AI Platform, and you want to move it to production. You serve a few thousand queries per second and are experiencing latency issues. Incoming requests are served by a load balancer that distributes them across multiple Kubeflow CPU-only pods running on Google Kubernetes Engine (GKE). Your goal is to improve the serving latency without changing the underlying infrastructure. What should you do?

  1. Significantly increase the max_batch_size TensorFlow Serving parameter.
  2. Switch to the tensorflow-model-server-universal version of TensorFlow Serving.
  3. Significantly increase the max_enqueued_batches TensorFlow Serving parameter.
  4. Recompile TensorFlow Serving using the source to support CPU-specific optimizations. Instruct GKE to choose an appropriate baseline minimum CPU platform for serving nodes.

Question 33

You have a demand forecasting pipeline in production that uses Dataflow to preprocess raw data prior to model training and prediction. During preprocessing, you employ Z-score normalization on data stored in BigQuery and write it back to BigQuery. New training data is added every week. You want to make the process more efficient by minimizing computation time and manual intervention. What should you do?

  1. Normalize the data using Google Kubernetes Engine.
  2. Translate the normalization algorithm into SQL for use with BigQuery.
  3. Use the normalizer_fn argument in TensorFlow's Feature Column API.
  4. Normalize the data with Apache Spark using the Dataproc connector for BigQuery.

Question 34

You need to design a customized deep neural network in Keras that will predict customer purchases based on their purchase history. You want to explore model performance using multiple model architectures, store training data, and be able to compare the evaluation metrics in the same dashboard. What should you do?

  1. Create multiple models using AutoML Tables.
  2. Automate multiple training runs using Cloud Composer.
  3. Run multiple training jobs on AI Platform with similar job names.
  4. Create an experiment in Kubeflow Pipelines to organize multiple runs.

Question 35

You are developing a Kubeflow pipeline on Google Kubernetes Engine. The first step in the pipeline is to issue a query against BigQuery. You plan to use the results of that query as the input to the next step in your pipeline. You want to achieve this in the easiest way possible. What should you do?

  1. Use the BigQuery console to execute your query, and then save the query results into a new BigQuery table.
  2. Write a Python script that uses the BigQuery API to execute queries against BigQuery. Execute this script as the first step in your Kubeflow pipeline.
  3. Use the Kubeflow Pipelines domain-specific language to create a custom component that uses the Python BigQuery client library to execute queries.
  4. Locate the Kubeflow Pipelines repository on GitHub. Find the BigQuery Query Component, copy that component's URL, and use it to load the component into your pipeline. Use the component to execute queries against BigQuery.