DL-06 - Transfer learning Flashcards
DL-06 - Transfer learning
Describe transfer learning.
Transfer learning is the process of utilizing a pre-trained neural network model, typically on a similar task, and fine-tuning it for a new, specific task.
DL-06 - Transfer learning
What are the stages in a transfer learning workflow? (5)
- Remove unnecessary layers.
- Freeze layers.
- Add new, trainable layers.
- Train the new layers.
- (Optional) Fine-tuning.
DL-06 - Transfer learning
What does transfer learning depend on?
The size and similarity of your new dataset relative to the old one.
DL-06 - Transfer learning
When using transfer learning, there are 4 cases to consider. What are they?
Whether your new dataset is:
- small/large.
- similar/different from the original dataset.
DL-06 - Transfer learning
What is the approach when your new data is small and similar to the model’s dataset?
- Replace last layer with your own.
- Freeze everything in the pretrained.
- Train only own layer.
(See image)
DL-06 - Transfer learning
What is the approach when your new data is small and different from the model’s dataset?
- Replace some CNN layers and add output FC layer
- Freeze pre-trained.
- Train only own layers.
(See image)
DL-06 - Transfer learning
What is the approach when your new data is large and similar to the model’s dataset?
- Keep all layers.
- Replace last layer with your own, maybe test changing last 2?
- Can train whole network.
Enough data to not worry about overfitting.
(See image)
DL-06 - Transfer learning
What is the approach when your new data is large and different to the model’s dataset?
- Keep all layers.
- Replace last layer(s) with your own.
- Train everything (Or several later layers).
In this case, the CNN layers are mostly retrained from scratch. But we could as well initialize it with the pre-trained weights.
(See image)
DL-06 - Transfer learning
What is the approach when your new data is large and different from the model’s dataset?
- Replace one or more later layers with your own, e.g. last conv + all full layers.
- Train everything.
(See image)