Build Deep Neural Networks
Build networks from scratch using MATLAB® code or interactively using the Deep Network Designer app. Use built-in layers to construct networks for tasks such as classification and regression. To see a list of built-in layers, see List of Deep Learning Layers. You can then analyze your network to understand the network architecture and check for problems before training.
If the built-in layers do not provide the layer that you need for your task, then you can define your own custom deep learning layer. You can define custom layers with learnable and state parameters. After you define a custom layer, you can check that the layer is valid, GPU compatible, and outputs correctly defined gradients.
For models that cannot be specified as networks of layers, you can define the model as a function. For an example showing how to train a deep learning model defined as a function, see Train Network Using Model Function.
Apps
Deep Network Designer | Design and visualize deep learning networks |
Functions
Topics
Built-In Layers
- Long Short-Term Memory Neural Networks
Learn about long short-term memory (LSTM) neural networks. - Create Simple Deep Learning Neural Network for Classification
This example shows how to create and train a simple convolutional neural network for deep learning classification. - 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. - Create and Train Network with Nested Layers
This example shows how to create and train a network with nested layers using network layers. (Since R2024a) - Example Deep Learning Networks Architectures
This example shows how to define simple deep learning neural networks for classification and regression tasks. - Choose an AI Model
Explore options for choosing an AI model. - Generate MATLAB Code from Deep Network Designer
Generate MATLAB code to recreate designing a network in Deep Network Designer.
Custom Layers
- Define Custom Deep Learning Layers
Learn how to define custom deep learning layers. - Deep Learning Network Composition
Define custom layers that contain neural networks. - Define Nested Deep Learning Layer Using Network Composition
This example shows how to define a nested custom deep learning layer. - Check Custom Layer Validity
Learn how to check the validity of custom deep learning layers. - View Autogenerated Custom Layers Using Deep Network Designer
This example shows how to import a pretrained TensorFlow™ network and view the autogenerated layers in Deep Network Designer.