Main Content

Deep Learning Code Generation

Generate MATLAB® code or CUDA® and C++ code and deploy deep learning networks

Use Deep Network Designer to generate MATLAB code to construct and train a network.

Use MATLAB Coder™ or GPU Coder™ together with Deep Learning Toolbox™ to generate C++ or CUDA code and deploy convolutional neural networks on embedded platforms that use Intel®, ARM®, or NVIDIA® Tegra® processors.

Functions

dlquantizerQuantize a deep neural network to 8-bit scaled integer data types
dlquantizationOptionsOptions for quantizing a trained deep neural network
calibrateSimulate and collect ranges of a deep neural network
validateQuantize and validate a deep neural network

Apps

Deep Network QuantizerQuantize a deep neural network to 8-bit scaled integer data types

Topics

Deep Learning Quantization

Quantization of Deep Neural Networks

Understand effects of quantization and how to visualize dynamic ranges of network convolution layers.

Code Generation for Quantized Deep Learning Networks (GPU Coder)

Quantize and generate code for a pretrained convolutional neural network.

Code Generation for Quantized Deep Learning Networks (MATLAB Coder)

Quantize and generate code for a pretrained convolutional neural network.

MATLAB Code Generation

Generate MATLAB Code from Deep Network Designer

Generate MATLAB code to recreate designing and training a network in Deep Network Designer.

GPU Code Generation

Deep Learning with GPU Coder (GPU Coder)

Generate CUDA code for deep learning neural networks

Code Generation for a Deep Learning Simulink Model that Performs Lane and Vehicle Detection (GPU Coder)

This example shows how to develop a CUDA® application from a Simulink® model that performs lane and vehicle detection using convolutional neural networks (CNN).

Generate Digit Images on NVIDIA GPU Using Variational Autoencoder (GPU Coder)

This example shows how to generate CUDA® MEX for a trained variational autoencoder (VAE) network.

Code Generation For Object Detection Using YOLO v3 Deep Learning

This example shows how to generate CUDA® MEX for a you only look once (YOLO) v3 object detector with custom layers.

Code Generation for a Deep Learning Simulink Model to Classify ECG Signals (GPU Coder)

This example demonstrates how you can use powerful signal processing techniques and Convolutional Neural Networks together to classify ECG signals.

Code Generation for Deep Learning Networks

This example shows how to perform code generation for an image classification application that uses deep learning.

Code Generation for a Sequence-to-Sequence LSTM Network

This example demonstrates how to generate CUDA® code for a long short-term memory (LSTM) network.

Deep Learning Prediction on ARM Mali GPU

This example shows how to use the cnncodegen function to generate code for an image classification application that uses deep learning on ARM® Mali GPUs.

Deploy Signal Classifier on NVIDIA Jetson Using Wavelet Analysis and Deep Learning

This example shows how to generate and deploy a CUDA® executable that classifies human electrocardiogram (ECG) signals using features extracted by the continuous wavelet transform (CWT) and a pretrained convolutional neural network (CNN).

Code Generation for Object Detection by Using YOLO v2

This example shows how to generate CUDA® MEX for a you only look once (YOLO) v2 object detector.

Lane Detection Optimized with GPU Coder

This example shows how to generate CUDA® code from a deep learning network, represented by a SeriesNetwork object.

Deep Learning Prediction by Using NVIDIA TensorRT

This example shows code generation for a deep learning application by using the NVIDIA TensorRT™ library.

Traffic Sign Detection and Recognition

This example shows how to generate CUDA® MEX code for a traffic sign detection and recognition application that uses deep learning.

Logo Recognition Network

This example shows code generation for a logo classification application that uses deep learning.

Code Generation for Denoising Deep Neural Network

This example shows how to generate CUDA® MEX from MATLAB® code and denoise grayscale images by using the denoising convolutional neural network (DnCNN [1]).

Code Generation for Semantic Segmentation Network

This example shows code generation for an image segmentation application that uses deep learning.

Train and Deploy Fully Convolutional Networks for Semantic Segmentation

This example shows how to train and deploy a fully convolutional semantic segmentation network on an NVIDIA® GPU by using GPU Coder™.

Code Generation for Semantic Segmentation Network That Uses U-net

This example shows code generation for an image segmentation application that uses deep learning.

CPU Code Generation

Code Generation for Deep Learning on ARM Targets

This example shows how to generate and deploy code for prediction on an ARM®-based device without using a hardware support package.

Deep Learning Prediction with ARM Compute Using codegen

This example shows how to use codegen to generate code for a Logo classification application that uses deep learning on ARM® processors.

Deep Learning Code Generation on Intel Targets for Different Batch Sizes

This example shows how to use the codegen command to generate code for an image classification application that uses deep learning on Intel® processors.

Generate Digit Images Using Variational Autoencoder on Intel CPUs (MATLAB Coder)

Generate code for a trained VAE dlnetwork to generate hand-drawn digits.

Generate C++ Code for Object Detection Using YOLO v2 and Intel MKL-DNN

This example shows how to generate C++ code for the YOLO v2 Object detection network on an Intel® processor.

Deploy Signal Classifier Using Wavelets and Deep Learning on Raspberry Pi

This example shows the workflow to classify human electrocardiogram (ECG) signals using the Continuous Wavelet Transform (CWT) and a deep convolutional neural network (CNN).

Deploy Signal Segmentation Deep Network on Raspberry Pi

Generate a MEX function and a standalone executable to perform waveform segmentation on a Raspberry Pi™.

Code Generation and Deployment of MobileNet-v2 Network to Raspberry Pi

This example shows how to generate and deploy C++ code that uses the MobileNet-v2 pretrained network for object prediction.

Code Generation for Semantic Segmentation Application on Intel CPUs That Uses U-Net

Generate a MEX function that performs image segmentation by using the deep learning network U-Net on Intel CPUs.

Code Generation for Semantic Segmentation Application on ARM® Neon targets That Uses U-Net

Generate a static library that performs image segmentation by using the deep learning network U-Net on ARM targets.

Code Generation for LSTM Network on Raspberry Pi

Generate code for a pretrained long short-term memory network to predict Remaining Useful Life (RUI) of a machine.

Code Generation for LSTM Network That Uses Intel MKL-DNN

Generate code for a pretrained LSTM network that makes predictions for each step of an input timeseries.

Cross Compile Deep Learning Code for ARM Neon Targets

Generate library or executable code on host computer for deployment on ARM hardware target.

Code Generation for Quantized Deep Learning Network on Raspberry Pi (MATLAB Coder)

Generate code for deep learning network that performs inference computations in 8-bit integers.

Generate Generic C/C++ Code for Sequence-to-Sequence Regression That Uses Deep Learning

Generate C/C++ code for a trained CNN that does not depend on any third-party libraries.

Load Pretrained Networks for Code Generation (MATLAB Coder)

Create a SeriesNetwork, DAGNetwork, yolov2ObjectDetector, ssdObjectDetector, or dlnetwork object for code generation.

Deep Learning with MATLAB Coder (MATLAB Coder)

Generate C++ code for deep learning neural networks (requires Deep Learning Toolbox)

Featured Examples