Main Content

Build and Train Networks

Create deep neural networks for sequence and tabular data, and train from scratch

Create new deep networks for classification, regression, and forecasting tasks by defining the network architecture and training the network from scratch.

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. If the trainingOptions function does not provide the training options that you need for your task, or custom output layers do not support the loss functions that you need, then you can define a custom training loop.

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.


  • Build Deep Neural Networks
    Build networks for sequence and tabular data using MATLAB® code or interactively using Deep Network Designer
  • Built-In Training
    Train deep learning networks for sequence and tabular data using built-in training functions
  • Custom Training Loops
    Customize deep learning training loops and loss functions for sequence and tabular data