Main Content

Built-In Training

Train deep learning networks for sequence and tabular data using built-in training functions

After defining the network architecture, you can define training parameters using the trainingOptions function. You can then train the network using trainNetwork or trainnet. Use the trained network to predict class labels or numeric responses, or forecast future time steps.

You can train a 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 supported GPU device (for information on supported devices, see GPU Computing Requirements (Parallel Computing Toolbox)). Specify the execution environment using the trainingOptions function.


Deep Network DesignerDesign, visualize, and train deep learning networks


expand all

trainingOptionsOptions for training deep learning neural network
trainNetworkTrain neural network
trainnetTrain deep learning neural network (Since R2023b)
analyzeNetworkAnalyze deep learning network architecture
classifyClassify data using trained deep learning neural network
predictPredict responses using trained deep learning neural network
activationsCompute deep learning network layer activations
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 state parameters of neural network
confusionchartCreate confusion matrix chart for classification problem
sortClassesSort classes of confusion matrix chart


Multilayer Perceptron Networks

Recurrent Networks

Convolutional Networks

Deep Learning with MATLAB

  • 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.