Udacity Self-Driving Car Engineer Nanodegree: Transfer Learning
-
Import a pre-trained network by using the Keras Applications models
-
freeze all the weights from the pre-trained network
-
train the network to update the weights of the new fully connected layer
-
slice off most of the pre-trained layers near the beginning of the network
-
freeze all the weights from the pre-trained network
-
train the network to update the weights of the new fully connected layer
- re-train the entire neural network
-
retrain the network from scratch
-
alternatively, you could just use the same strategy as the "large and similar" data case
Two popular methods:
- Feature extraction.
Take a pretrained neural network and replace the final (classification) layer with a new classification layer, or perhaps even a small feedforward network that ends with a new classification layer.
During training the weights in all the pre-trained layers are frozen, so only the weights for the new layer(s) are trained.
In other words, the gradient doesn't flow backwards past the first new layer.
- Finetuning
This is similar to feature extraction except the pre-trained weights aren't frozen. The network is trained end-to-end.