Main Content

Simulink 深度学习

使用 Simulink 扩展深度学习工作流

通过使用 Deep Learning Toolbox™ 中包含的 Deep Neural Networks、Python Neural Networks 和 Deep Learning Layers 模块库中的模块,或使用 Computer Vision Toolbox™ 中包含的 Analysis & Enhancement 模块库中的 Deep Learning Object Detector 模块,在 Simulink® 模型中实现深度学习功能。

要生成使用 Deep Learning Layers 模块库来表示网络的 Simulink 模型,请使用 exportNetworkToSimulink 函数。

Simulink 中某些深度学习功能使用的 MATLAB Function 模块需要支持的编译器。对于大多数平台,会随 MATLAB® 安装提供一个默认的 C 编译器。使用 C++ 语言时,必须安装兼容的 C++ 编译器。要查看支持的编译器列表,请打开支持和兼容的编译器,点击与您的操作系统对应的选项卡,找到 Simulink Product Family 表,并转至 For Model Referencing, Accelerator mode, Rapid Accelerator mode, and MATLAB Function blocks 列。如果您的系统上安装了多个 MATLAB 支持的编译器,可以使用 mex -setup 命令更改默认编译器。请参阅更改默认编译器

函数

exportNetworkToSimulinkGenerate Simulink model that contains deep learning layer blocks that correspond to deep learning layer objects (自 R2024b 起)

模块

全部展开

Image Classifier使用经过训练的深度学习神经网络对数据进行分类 (自 R2020b 起)
Predict使用经过训练的深度学习神经网络预测响应 (自 R2020b 起)
Stateful ClassifyClassify data using a trained deep learning recurrent neural network (自 R2021a 起)
Stateful PredictPredict responses using a trained recurrent neural network (自 R2021a 起)
Deep Learning Object DetectorDetect objects using trained deep learning object detector (自 R2021b 起)
TensorFlow Model PredictPredict responses using pretrained Python TensorFlow model (自 R2024a 起)
PyTorch Model PredictPredict responses using pretrained Python PyTorch model (自 R2024a 起)
ONNX Model PredictPredict responses using pretrained Python ONNX model (自 R2024a 起)
Custom Python Model PredictPredict responses using pretrained custom Python model (自 R2024a 起)
Clipped ReLU LayerClipped Rectified Linear Unit (ReLU) layer (自 R2024b 起)
GELU LayerGaussian error linear unit (GELU) layer (自 R2024b 起)
Leaky ReLU LayerLeaky rectified linear unit (ReLU) layer (自 R2024b 起)
ReLU LayerRectified linear unit (ReLU) layer (自 R2024b 起)
Sigmoid LayerSigmoid layer (自 R2024b 起)
Softmax LayerSoftmax layer (自 R2024b 起)
Tanh LayerHyperbolic tangent (tanh) layer (自 R2024a 起)
Addition LayerAddition layer (自 R2024b 起)
Concatenation LayerConcatenation layer (自 R2024b 起)
Depth Concatenation LayerDepth concatenation layer (自 R2024b 起)
Multiplication LayerMultiplication layer (自 R2024b 起)
Convolution 1D Layer1-D convolutional layer (自 R2024b 起)
Convolution 2D Layer2-D convolutional layer (自 R2024b 起)
Convolution 3D Layer3-D convolutional layer (自 R2024b 起)
Fully Connected LayerFully connected layer (自 R2024b 起)
Rescale-Symmetric 1D1-D input layer with rescale-symmetric normalization (自 R2024b 起)
Rescale-Symmetric 2D2-D input layer with rescale-symmetric normalization (自 R2024b 起)
Rescale-Symmetric 3D3-D input layer with rescale-symmetric normalization (自 R2024b 起)
Rescale-Zero-One 1D1-D input layer with rescale-zero-one normalization (自 R2024b 起)
Rescale-Zero-One 2D2-D input layer with rescale-zero-one normalization (自 R2024b 起)
Rescale-Zero-One 3D3-D input layer with rescale-zero-one normalization (自 R2024b 起)
Zerocenter 1D1-D input layer with zerocenter normalization (自 R2024b 起)
Zerocenter 2D2-D input layer with zerocenter normalization (自 R2024b 起)
Zerocenter 3D3-D input layer with zerocenter normalization (自 R2024b 起)
Zscore 1D1-D input layer with zscore normalization (自 R2024b 起)
Zscore 2D2-D input layer with zscore normalization (自 R2024b 起)
Zscore 3D3-D input layer with zscore normalization (自 R2024b 起)
Batch Normalization LayerBatch normalization layer (自 R2024b 起)
Layer Normalization LayerLayer normalization layer (自 R2024b 起)
Average Pooling 1D Layer1-D average pooling layer (自 R2024b 起)
Average Pooling 2D Layer2-D average pooling layer (自 R2024b 起)
Average Pooling 3D Layer3-D average pooling layer (自 R2024b 起)
Global Average Pooling 1D Layer1-D global average pooling layer (自 R2024b 起)
Global Average Pooling 2D Layer2-D global average pooling layer (自 R2024b 起)
Global Average Pooling 3D Layer3-D global average pooling layer (自 R2024b 起)
Global Max Pooling 1D Layer1-D global max pooling layer (自 R2024b 起)
Global Max Pooling 2D Layer2-D global max pooling layer (自 R2024b 起)
Global Max Pooling 3D Layer3-D global max pooling layer (自 R2024b 起)
Max Pooling 1D Layer1-D max pooling layer (自 R2024b 起)
Max Pooling 2D Layer2-D max pooling layer (自 R2024b 起)
Max Pooling 3D Layer3-D max pooling layer (自 R2024b 起)
Flatten LayerFlatten layer (自 R2024b 起)
LSTM LayerLong short-term memory (LSTM) layer for recurrent neural network (RNN) (自 R2024b 起)
LSTM Projected LayerLong short-term memory (LSTM) projected layer for recurrent neural network (RNN) (自 R2024b 起)
Dropout LayerDropout layer (自 R2024b 起)

主题

深度学习层模块

图像

序列

强化学习

Python 协同执行

代码生成

精选示例