This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Convolutional Neural Networks

Perform classification, regression, feature extraction, and transfer learning using convolutional neural networks (CNNs, ConvNets)

Convolution neural networks (ConvNets or CNNs) are essential tools for deep learning, and are especially suited for image recognition. You can construct a ConvNet architecture, train a network, and use the trained network to predict class labels or numeric responses. You can also extract features from a pretrained network, and use these features to train a linear classifier. Neural Network Toolbox also enables you to perform transfer learning; that is, retrain the last fully connected layer of an existing ConvNet on new data.

You can train a convolutional neural network 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 trainingOptions function.


trainingOptions Options for training neural network
trainNetwork Train a convolutional network
imageInputLayer Image input layer
convolution2dLayer Convolutional layer
reluLayer Rectified Linear Unit (ReLU) layer
crossChannelNormalizationLayer Channel-wise local response normalization layer
averagePooling2dLayer Average pooling layer object
maxPooling2dLayer Max pooling layer
fullyConnectedLayer Fully connected layer
dropoutLayer Dropout layer
softmaxLayer Softmax layer for convolutional neural networks
classificationLayer Create a classification output layer
regressionLayer Create a regression output layer
activations Compute convolutional neural network layer activations
predict Predict responses using a trained convolutional neural network
classify Classify data using a trained convolutional neural network
deepDreamImage Visualize network features using deep dream
alexnet Pretrained AlexNet convolutional neural network
vgg16 Pretrained VGG-16 convolutional neural network
vgg19 Pretrained VGG-19 convolutional neural network
importCaffeLayers Import convolutional neural network layers from Caffe
importCaffeNetwork Import pretrained convolutional neural network models from Caffe


SeriesNetwork Series network class
TrainingOptionsSGDM Training options for stochastic gradient descent with momentum
Layer Network layer
ImageInputLayer Image input layer
Convolution2DLayer Convolutional layer
ReLULayer Rectified Linear Unit (ReLU) layer
CrossChannelNormalizationLayer Channel-wise local response normalization layer
AveragePooling2DLayer Average pooling layer object
MaxPooling2DLayer Max pooling layer
FullyConnectedLayer Fully connected layer
DropoutLayer Dropout layer
SoftmaxLayer Softmax layer for convolutional neural networks
ClassificationOutputLayer Classification output layer
RegressionOutputLayer Regression output layer


Start Here

Deep Learning in MATLAB

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.

Introduction to Convolutional Neural Networks

Learn about convolutional neural networks and how they work in MATLAB.

Create New Deep Network

Specify Layers of Convolutional Neural Network

Learn about the layers of a convolutional neural network (ConvNet), and the order they appear in a ConvNet

Set Up Parameters and Train Convolutional Neural Network

Learn how to set up training parameters for a convolutional neural network

Create Simple Deep Learning Network for Classification

This example shows how to create and train a simple convolutional neural network for deep learning classification.

Resume Training from a Checkpoint Network

Learn how to save checkpoint networks while training a convolutional neural network and resume training from a previously saved network

Train a Convolutional Neural Network for Regression

This example shows how to fit a regression model using convolutional neural networks to predict the angles of rotation of handwritten digits.

Work With Pretrained Networks

Transfer Learning and Fine-Tuning of Convolutional Neural Networks

This example shows how to classify new image data by fine-tuning an existing, pretrained convolutional neural network.

Pretrained Convolutional Neural Networks

Learn how to download and use pretrained convolutional neural networks for classification, transfer learning and feature extraction.

Image Category Classification Using Deep Learning (Computer Vision System Toolbox)

This example shows how to use a pre-trained Convolutional Neural Network (CNN) as a feature extractor for training an image category classifier.

Extract and Visualize Features

Visualize Activations of a Convolutional Neural Network

This example shows how to feed an image to a convolutional neural network and display the activations of different layers of the network.

Visualize Features of a Convolutional Neural Network

This example shows how to visualize the features learned by convolutional neural networks.

Featured Examples

Was this topic helpful?