Documentation

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.

Deep Learning Training from Scratch

Create new deep networks for image classification and regression, including series, DAG, and LSTM networks, import from Caffe, or define your own layers

Create new deep networks for image classification and regression, including series, directed acyclic graph (DAG), and long short-term memory (LSTM) networks. To create and train a new network, you can use the built-in layers, define your own layers, or import layers from Caffe models. After defining the network layers, you must define the training parameters using trainingOptions function. You can then train the network using the trainNetwork function. Use the trained network to predict class labels or numeric responses.

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 execution environment using the trainingOptions function.

Convolutional Neural Network

Functions

alexnetPretrained AlexNet convolutional neural network
vgg16Pretrained VGG-16 convolutional neural network
vgg19Pretrained VGG-19 convolutional neural network
googlenetPretrained GoogLeNet convolutional neural network
importCaffeLayersImport convolutional neural network layers from Caffe
importCaffeNetworkImport pretrained convolutional neural network models from Caffe
imageInputLayerImage input layer
sequenceInputLayerSequence input layer
convolution2dLayer2-D convolutional layer
transposedConv2dLayerTransposed 2-D convolution layer
fullyConnectedLayerFully connected layer
LSTMLayerLong short-term memory (LSTM) layer
reluLayerRectified Linear Unit (ReLU) layer
leakyReluLayerLeaky Rectified Linear Unit (ReLU) layer
clippedReluLayerClipped Rectified Linear Unit (ReLU) layer
batchNormalizationLayerBatch normalization layer
crossChannelNormalizationLayer Channel-wise local response normalization layer
dropoutLayerDropout layer
averagePooling2dLayerAverage pooling layer
maxPooling2dLayerMax pooling layer
maxUnpooling2dLayerMax unpooling layer
additionLayerAddition layer
depthConcatenationLayerDepth concatenation layer
softmaxLayerSoftmax layer
classificationLayerCreate classification output layer
regressionLayerCreate a regression output layer
setLearnRateFactorSet learn rate factor of layer learnable parameter
setL2FactorSet L2 regularization factor of layer learnable parameter
getLearnRateFactorGet learn rate factor of layer learnable parameter
getL2FactorGet L2 regularization factor of layer learnable parameter
trainingOptionsOptions for training neural network
trainNetworkTrain neural network for deep learning
SeriesNetworkSeries network for deep learning
DAGNetworkDirected acyclic graph (DAG) network for deep learning
imageDataAugmenterConfigure image data augmentation
augmentedImageSourceGenerate batches of augmented image data
layerGraphGraph of network layers for deep learning
plotPlot neural network layer graph
addLayersAdd layers to layer graph
connectLayersConnect layers in layer graph
removeLayersRemove layers from layer graph
disconnectLayersDisconnect layers in layer graph
DAGNetworkDirected acyclic graph (DAG) network for deep learning
predictPredict responses using a trained deep learning neural network
classifyClassify data using a trained deep learning neural network
predictAndUpdateStatePredict responses using a trained recurrent neural network and update the network state
classifyAndUpdateStateClassify data using a trained recurrent neural network and update the network state
resetStateReset the state of a recurrent neural network

Examples and How To

Create New Deep 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.

Classify Sequence Data Using LSTM Networks

This example shows how to classify sequence data using Long Short-Term Memory (LSTM) networks.

Create and Train DAG Network for Deep Learning

This example shows how to create and train a directed acyclic graph (DAG) network for deep learning.

Define New Layers

Define New Deep Learning Layers

Learn how to define new deep learning layers

Define a Layer with Learnable Parameters

This example shows how to define a PReLU layer and use it in a convolutional neural network.

Define a Regression Output Layer

This example shows how to define a regression output layer with mean absolute error (MAE) loss and use it in a convolutional neural network.

Define a Classification Output Layer

This example shows how to define a classification output layer with sum of squares error (SSE) loss and use it in a convolutional neural network.

Concepts

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.

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

Long Short-Term Memory Networks

Learn about long short-term memory (LSTM) networks

Preprocess Images for Deep Learning

Learn how to preprocess images using an image data augmenter and how to resize images for classification and prediction.

Featured Examples

Was this topic helpful?