Google Professional Machine Learning Engineer exam dumps

Google Professional Machine Learning Engineer practice question 513 of 522

Professional Machine Learning Engineer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Machine Learning Engineer Question 513

Single answerGoogle Cloud Platform

You are building a machine learning pipeline on Google Cloud to classify images of animals into multiple categories. The input data consists of images of varying sizes and resolutions. To preprocess the data, you need to ensure that the input tensors for the model have consistent dimensions. Which approach should you use to address this issue?

  1. A

    Resize all images to a fixed height and width before feeding them into the model

  2. B

    Use padding to make all images the same size without distorting the aspect ratio

  3. C

    Store the original image dimensions as metadata and let the model handle resizing dynamically

  4. D

    Use a pre-trained model that supports variable input dimensions without preprocessing

Show answer and explanation

Correct answer: A

Explanation

Most machine learning models require input tensors to have consistent dimensions. Resizing all images to a fixed height and width is a standard preprocessing step to ensure uniformity in input data. Other approaches, such as padding or relying on the model to handle resizing dynamically, are either less common or not directly supported by standard architectures.

  • A. Correct.

    Correct. Resizing all images to a fixed height and width ensures that the input tensors have consistent dimensions, which is required for most machine learning models.

  • B. Incorrect.

    Incorrect. Padding can preserve the aspect ratio but still results in inconsistent dimensions if the original images have widely varying sizes.

  • C. Incorrect.

    Incorrect. Storing dimensions as metadata does not address the issue of tensor consistency required by the model. The model cannot dynamically handle resizing without explicit preprocessing.

  • D. Incorrect.

    Incorrect. While some advanced models, like certain vision transformers, support variable input dimensions, this is not the standard approach and depends on specific architectures.

Timed practice exam

Take a Google Professional Machine Learning Engineer practice test under exam conditions

60 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam