Main Content

Deep Learning Import, Export, and Customization

Import, export, and customize deep learning networks, and customize layers, training loops, and loss functions

Import networks and layer graphs from TensorFlow™ 2, TensorFlow-Keras, PyTorch®, the ONNX™ (Open Neural Network Exchange) model format, and Caffe. You can also export Deep Learning Toolbox™ networks and layer graphs to TensorFlow 2 and the ONNX model format. For more information, see Pretrained Deep Neural Networks.

You can define your own custom deep learning layer for your problem. You can specify a custom loss function using a custom output layer and define custom layers with or without learnable parameters. After defining a custom layer, you can check that the layer is valid, GPU compatible, and outputs correctly defined gradients.

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. For networks that cannot be created using layer graphs, you can define custom networks as a function. To learn more, see Define Custom Training Loops, Loss Functions, and Networks.