Click4Ai

330.

Medium

Transfer Learning

======================

Transfer learning is a technique used in deep learning where a pre-trained model is used as a starting point for a new task. This can be beneficial when the new task has limited data. In this problem, we will use transfer learning to classify images.

Example:

We have a pre-trained model that can classify images into 1000 categories. We want to use this model to classify images into 10 categories.

Constraints:

  • The pre-trained model is a convolutional neural network (CNN).
  • The new task has 10 categories.
  • The pre-trained model has 1000 categories.
  • The new task has limited data.
  • Test Cases

    Test Case 1
    Input: [VGG16(weights='imagenet', include_top=False, input_shape=(224, 224, 3)), 10]
    Expected: Model(inputs=..., outputs=Dense(...))
    Test Case 2
    Input: [VGG16(weights='imagenet', include_top=False, input_shape=(224, 224, 3)), 20]
    Expected: Model(inputs=..., outputs=Dense(...))
    + 3 hidden test cases