Main Content

Built-In Training

Train deep learning networks for image 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 the trainnet function. Use the trained network to predict class labels or numeric responses.

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.

Apps

Deep Network DesignerDesign and visualize deep learning networks

Functions

expand all

trainingOptionsOptions for training deep learning neural network
trainnetTrain deep learning neural network (Since R2023b)
testnetTest deep learning neural network (Since R2024b)
predictCompute deep learning network output for inference
minibatchpredictMini-batched neural network prediction (Since R2024a)
scores2labelConvert prediction scores to labels (Since R2024a)
confusionchartCreate confusion matrix chart for classification problem
sortClassesSort classes of confusion matrix chart

Topics

Featured Examples