Build Deep Neural Networks
Create new deep networks for tasks such as classification, regression, and forecasting by defining the network architecture from scratch. Build networks using MATLAB or interactively using Deep Network Designer.
For most tasks, you can use built-in layers. If there is not a built-in layer that you need for your task, then you can define your own custom layer. You can specify a custom loss function using a custom output layer and define custom layers with learnable and state parameters. After defining a custom layer, you can check that the layer is valid, GPU compatible, and outputs correctly defined gradients. For a list of supported layers, see List of Deep Learning Layers.
For models that layer graphs do not support, you can define a custom model as a function. To learn more, see Define Custom Training Loops, Loss Functions, and Networks.
|Deep Network Designer||Design, visualize, and train deep learning networks|
|Sequence input layer|
|Feature input layer|
|Long short-term memory (LSTM) layer for recurrent neural network (RNN)|
|Bidirectional long short-term memory (BiLSTM) layer for recurrent neural network (RNN)|
|Gated recurrent unit (GRU) layer for recurrent neural network (RNN)|
|Long short-term memory (LSTM) projected layer for recurrent neural network (RNN)|
Convolution, Attention, and Fully Connected Layers
|1-D convolutional layer|
|Transposed 1-D convolution layer|
|Fully connected layer|
Activation and Dropout Layers
|Rectified Linear Unit (ReLU) layer|
|Leaky Rectified Linear Unit (ReLU) layer|
|Clipped Rectified Linear Unit (ReLU) layer|
|Exponential linear unit (ELU) layer|
|Hyperbolic tangent (tanh) layer|
|Gaussian error linear unit (GELU) layer|
|Batch normalization layer|
|Group normalization layer|
|Instance normalization layer|
|Layer normalization layer|
|Channel-wise local response normalization layer|
|1-D max pooling layer|
|1-D average pooling layer|
|1-D global max pooling layer|
|1-D global average pooling layer|
|Depth concatenation layer|
|Sequence folding layer|
|Sequence unfolding layer|
|Classification output layer|
|Regression output layer|
|Graph of network layers for deep learning|
|Plot neural network architecture|
|Add layers to layer graph or network|
|Remove layers from layer graph or network|
|Replace layer in layer graph or network|
|Connect layers in layer graph or network|
|Disconnect layers in layer graph or network|
|Directed acyclic graph (DAG) network for deep learning|
|Check equality of deep learning layer graphs or networks|
|Check equality of deep learning layer graphs or networks ignoring
|Analyze deep learning network architecture|
|Deep learning network for custom training loops|
|Add input layer to network|
|Print network summary|
|Initialize learnable and state parameters of a
|Deep learning network data layout for learnable parameter initialization|
|Check validity of custom or function layer|
- Train Network with Numeric Features
This example shows how to create and train a simple neural network for deep learning feature data classification.
- Create Simple Sequence Classification Network Using Deep Network Designer
This example shows how to create a simple long short-term memory (LSTM) classification network using Deep Network Designer.
- Sequence Classification Using Deep Learning
This example shows how to classify sequence data using a long short-term memory (LSTM) network.
- Sequence-to-Sequence Classification Using Deep Learning
This example shows how to classify each time step of sequence data using a long short-term memory (LSTM) network.
- Sequence-to-Sequence Regression Using Deep Learning
This example shows how to predict the remaining useful life (RUL) of engines by using deep learning.
- Sequence-to-One Regression Using Deep Learning
This example shows how to predict the frequency of a waveform using a long short-term memory (LSTM) neural network.
- Long Short-Term Memory Neural Networks
Learn about long short-term memory (LSTM) neural networks.
- Example Deep Learning Networks Architectures
This example shows how to define simple deep learning neural networks for classification and regression tasks.
- Multiple-Input and Multiple-Output Networks
Learn how to define and train deep learning networks with multiple inputs or multiple outputs.
- List of Deep Learning Layers
Discover all the deep learning layers in MATLAB.
- Build Networks with Deep Network Designer
Interactively build and edit deep learning networks in Deep Network Designer.
- 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.
- Deep Learning Tips and Tricks
Learn how to improve the accuracy of deep learning networks.
- Data Sets for Deep Learning
Discover data sets for various deep learning tasks.
- Define Custom Deep Learning Layers
Learn how to define custom deep learning layers.
- Define Custom Deep Learning Intermediate Layers
Learn how to define custom deep learning intermediate layers.
- Define Custom Deep Learning Output Layers
Learn how to define custom deep learning output layers.
- Check Custom Layer Validity
Learn how to check the validity of custom deep learning layers.
- Replace Unsupported Keras Layer with Function Layer
This example shows how to import the layers from a pretrained Keras network, replace the unsupported layers with function layers, and assemble the layers into a network ready for prediction.