Transfer learning is the task of using the knowledge provided by a pretrained network to learn new patterns in new data. Fine-tuning a pretrained network with transfer learning is typically much faster and easier than training from scratch. Using pretrained deep networks enables you to quickly learn new tasks without defining and training a new network, having millions of images, or long training times. Transfer learning is suitable when you have small amounts of training data (for example, less than 1000 images). The advantage of transfer learning is that the pretrained network has already learned a rich set of features that can be applied to a wide range of other similar tasks.
You can either fine-tune a pretrained network using new data, or extract learned features from the pretrained network. If you extract learned features, you can then use those features to train a classifier, for example, a support vector machine on new data (Using a classifier requires Statistics and Machine Learning Toolbox™).
If you choose to fine-tune a pretrained network, you can train it on
either a CPU, a GPU, or multiple GPUs and/or in parallel. Training on a GPU
or in parallel requires the Parallel
Computing Toolbox™. Using a GPU requires a CUDA® enabled NVIDIA® GPU with compute capability 3.0 or higher. Specify the
training parameters including the execution environment using the
|Pretrained AlexNet convolutional neural network|
|Pretrained VGG-16 convolutional neural network|
|Pretrained VGG-19 convolutional neural network|
|Pretrained SqueezeNet convolutional neural network|
|Pretrained GoogLeNet convolutional neural network|
|Pretrained Inception-v3 convolutional neural network|
|Pretrained ResNet-50 convolutional neural network|
|Pretrained ResNet-101 convolutional neural network|
|Pretrained Inception-ResNet-v2 convolutional neural network|
This example shows how to classify an image using the pretrained deep convolutional neural network GoogLeNet.
This example shows how to use transfer learning to retrain AlexNet, a pretrained convolutional neural network, to classify a new set of images.
This example shows how to fine-tune a pretrained AlexNet convolutional neural network to perform classification on a new collection of images.
This example shows how to use transfer learning to retrain GoogLeNet, a pretrained convolutional neural network, to classify a new set of images.
This example shows how to extract learned image features from a pretrained convolutional neural network, and use those features to train an image classifier.
Learn how to download and use pretrained convolutional neural networks for classification, transfer learning and feature extraction.
Learn how to resize images for training, prediction and classification, and how to preprocess images using data augmentation and mini-batch datastores.