nerdexam
Amazon

MLS-C01 · Question #22

Machine Learning Specialist is training a model to identify the make and model of vehicles in images. The Specialist wants to use transfer learning and an existing model trained on images of general…

The correct answer is B. Initialize the model with pre-trained weights in all layers and replace the last fully connected layer. Standard transfer learning practice is to retain the pre-trained weights for all convolutional/feature-extraction layers (which have learned rich, general visual features from ImageNet) and replace only the final fully connected classification layer with a new one sized to the…

Modeling

Question

Machine Learning Specialist is training a model to identify the make and model of vehicles in images. The Specialist wants to use transfer learning and an existing model trained on images of general objects. The Specialist collated a large custom dataset of pictures containing different vehicle makes and models. What should the Specialist do to initialize the model to re-train it with the custom data?

Options

  • AInitialize the model with random weights in all layers including the last fully connected layer.
  • BInitialize the model with pre-trained weights in all layers and replace the last fully connected layer.
  • CInitialize the model with random weights in all layers and replace the last fully connected layer.
  • DInitialize the model with pre-trained weights in all layers including the last fully connected layer.

How the community answered

(27 responses)
  • A
    7% (2)
  • B
    89% (24)
  • C
    4% (1)

Explanation

Standard transfer learning practice is to retain the pre-trained weights for all convolutional/feature-extraction layers (which have learned rich, general visual features from ImageNet) and replace only the final fully connected classification layer with a new one sized to the number of vehicle make/model classes. The new classification head is then trained (and optionally the earlier layers fine-tuned) on the custom dataset. Initializing with random weights everywhere (A, C) discards the pre-trained knowledge and defeats the purpose of transfer learning. Keeping the original last layer with pre-trained weights (D) is incorrect because the output size corresponds to ImageNet classes (e.g., 1,000), not vehicle classes.

Topics

#Transfer Learning#Model Initialization#Computer Vision#Fine-tuning

Community Discussion

No community discussion yet for this question.

Full MLS-C01 Practice