Create new deep networks for image classification and regression tasks by defining the network architecture and training the network from scratch. You can also use transfer learning to take advantage of the knowledge provided by a pretrained network to learn new patterns in new data. Fine-tuning a pretrained image classification 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 having a powerful GPU.
After defining the network architecture, you must define training
parameters using the
trainingOptions function. You
can then train the network using
trainNetwork. Use the trained
network to predict class labels or numeric responses.
You can train a convolutional neural network on a CPU, a GPU, multiple
CPUs or GPUs, or in parallel on a cluster or in the cloud. Training on a GPU
or in parallel requires Parallel
Computing Toolbox™. Using a GPU requires a CUDA® enabled NVIDIA® GPU with compute capability 3.0 or higher. Specify the
execution environment using the
|Deep Network Designer||Edit and build deep learning networks|
|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-18 convolutional neural network|
|Pretrained ResNet-50 convolutional neural network|
|Pretrained ResNet-101 convolutional neural network|
|Pretrained DenseNet-201 convolutional neural network|
|Pretrained Inception-ResNet-v2 convolutional neural network|
|Image input layer|
|2-D convolutional layer|
|Fully connected layer|
|Rectified Linear Unit (ReLU) layer|
|Leaky Rectified Linear Unit (ReLU) layer|
|Clipped Rectified Linear Unit (ReLU) layer|
|Batch normalization layer|
|Channel-wise local response normalization layer|
|Average pooling layer|
|Max pooling layer|
|Max unpooling layer|
|Depth concatenation layer|
|Transposed 2-D convolution layer|
|Classification output layer|
|Create a regression output layer|
|Graph of network layers for deep learning|
|Plot neural network layer graph|
|Add layers to layer graph|
|Remove layers from layer graph|
|Replace layer in layer graph|
|Connect layers in layer graph|
|Disconnect layers in layer graph|
|Directed acyclic graph (DAG) network for deep learning|
|Classify data using a trained deep learning neural network|
|Compute convolutional neural network layer activations|
|Predict responses using a trained deep learning neural network|
|Create confusion matrix chart for classification problem|
|ConfusionMatrixChart Properties||Confusion matrix chart appearance and behavior|
|Sort classes of confusion matrix chart|
This example shows how to classify an image using the pretrained deep convolutional neural network GoogLeNet.
This example shows how to classify images from a webcam in real time using the pretrained deep convolutional neural network GoogLeNet.
Interactively fine-tune a pretrained deep learning network to learn a new image classification task.
This example shows how to use transfer learning to retrain a 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 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.
This example shows how to create and train a simple convolutional neural network for deep learning classification.
Interactively build and edit deep learning networks.
Learn how to save checkpoint networks while training a convolutional neural network and resume training from a previously saved network
This example shows how to fit a regression model using convolutional neural networks to predict the angles of rotation of handwritten digits.
Discover all the deep learning layers in MATLAB®.
Learn about the layers of a convolutional neural network (ConvNet), and the order they appear in a ConvNet
This example shows how to create a deep learning neural network with residual connections and train it on CIFAR-10 data.
Discover deep learning capabilities in MATLAB using convolutional neural networks for classification and regression, including pretrained networks and transfer learning, and training on GPUs, CPUs, clusters, and clouds.
Learn how to set up training parameters for a convolutional neural network
Train deep networks on CPUs, GPUs, clusters, and clouds, and tune options to suit your hardware.
Learn how to resize images for training, prediction and classification, and how to preprocess images using data augmentation and mini-batch datastores.
This example shows how to convert a trained classification network into a regression network.
Learn how to improve the accuracy of deep learning networks.