Main Content

本页的翻译已过时。点击此处可查看最新英文版本。

深度学习代码生成

生成 MATLAB® 代码或 CUDA® 和 C++ 代码,并部署深度学习网络

使用深度网络设计器生成 MATLAB 代码来构造和训练网络。

MATLAB Coder™ 或 GPU Coder™ 与 Deep Learning Toolbox™ 一起使用以生成 C++ 或 CUDA 代码,并在使用 Intel®、ARM®NVIDIA® Tegra® 处理器的嵌入式平台上部署卷积神经网络。

函数

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

App

深度网络量化器Quantize a deep neural network to 8-bit scaled integer data types

主题

深度学习量化

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 代码生成

Generate MATLAB Code from Deep Network Designer

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

GPU 代码生成

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.

深度学习网络的代码生成

此示例说明如何为使用深度学习的图像分类应用程序执行代码生成。它使用 codegen 命令生成一个 MEX 函数,该函数使用图像分类网络(如 MobileNet-v2、ResNet 和 GoogLeNet)运行预测。

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

为使用 YOLO v2 的目标检测生成代码

此示例说明如何为 you only look once (YOLO) v2 目标检测器生成 CUDA® MEX。YOLO v2 目标检测网络由两个子网络组成。一个特征提取网络,后跟一个检测网络。此示例为 Computer Vision Toolbox™ 的使用 YOLO v2 深度学习进行目标检测示例中训练的网络生成代码。有关详细信息,请参阅Object Detection Using YOLO v2 Deep Learning (Computer Vision Toolbox)。您可以修改此示例,以便为从 Computer Vision Toolbox™ 中的导入预训练 ONNX YOLO v2 目标检测器示例导入的网络生成 CUDA® MEX。有关详细信息,请参阅Import Pretrained ONNX YOLO v2 Object Detector (Computer Vision Toolbox)。

使用 GPU Coder 优化车道检测

此示例说明如何从表示为 SeriesNetwork 对象的深度学习网络生成 CUDA® 代码。此示例中的串行网络是一个卷积神经网络,可以从图像中检测并输出车道标记边界。

Deep Learning Prediction by Using NVIDIA TensorRT

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

交通标志检测和识别

此示例说明如何为使用深度学习的交通标志检测和识别应用程序生成 CUDA® MEX 代码。交通标志检测和识别是驾驶辅助系统的重要应用,可辅助并向驾驶员提供有关道路标志的信息。

徽标识别网络

此示例说明如何为使用深度学习的徽标分类应用程序生成代码。它使用 codegen 命令生成 MEX 函数,该函数对名为 LogoNet 的 SeriesNetwork 对象执行预测。

去噪深度神经网络的代码生成

此示例说明如何从 MATLAB® 代码生成 CUDA® MEX,以及如何使用去噪卷积神经网络 (DnCNN [1]) 对灰度图像进行去噪。您可以使用去噪网络估计含噪图像中的噪声,然后将其去除以获得去噪图像。

语义分割网络的代码生成

此示例说明如何为使用深度学习的图像分割应用程序生成代码。它使用 codegen 命令生成一个基于 SegNet [1] 的 DAG 网络对象执行预测的 MEX 函数。SegNet 是一种用于图像分割的深度学习网络。

训练和部署用于语义分割的全卷积网络

此示例说明如何使用 GPU Coder™ 在 NVIDIA® GPU 上训练和部署全卷积语义分割网络。

使用 U-Net 的语义分割网络的代码生成

此示例说明如何为使用深度学习的图像分割应用程序生成代码。它使用 codegen 命令生成一个基于 U-Net 的 DAG 网络对象执行预测的 MEX 函数。U-Net 是一种用于图像分割的深度学习网络。

CPU 代码生成

ARM 目标上的深度学习代码生成

此示例说明如何在不使用硬件支持包的情况下,在基于 ARM® 的设备上为预测生成和部署代码。

通过 ARM 计算使用 codegen 进行深度学习预测

此示例说明如何使用 codegen 为在 ARM® 处理器上使用深度学习的徽标分类应用程序生成代码。徽标分类应用程序使用 LogoNet 串行网络从图像中执行徽标识别。生成的代码利用 ARM Compute Library 进行计算机视觉和机器学习。

针对不同批量大小在 Intel 目标上进行深度学习代码生成

此示例说明如何使用 codegen 命令为在 Intel® 处理器上使用深度学习的图像分类应用程序生成代码。生成的代码使用了用于深度神经网络的 Intel 数学核心函数库 (MKL-DNN)。此示例由两部分组成:

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.

加载预训练网络以用于代码生成 (MATLAB Coder)

创建 SeriesNetworkDAGNetworkyolov2ObjectDetectorssdObjectDetectordlnetwork 对象以用于代码生成。

使用 MATLAB Coder 进行深度学习 (MATLAB Coder)

生成用于深度学习神经网络的 C++ 代码(需要 Deep Learning Toolbox)

特色示例