Deep Learning mit Simulink
Implementieren Sie Deep-Learning-Funktionen in Simulink®-Modellen, indem Sie Blöcke aus den Blockbibliotheken „Deep Neural Networks“ und „Python Neural Networks“ verwenden, die in der Deep Learning Toolbox™ enthalten sind, oder indem Sie den Deep Learning Object Detector-Block aus der in der Computer Vision Toolbox™ enthaltenen Blockbibliothek „Analysis & Enhancement“ verwenden.
Die Deep-Learning-Funktionalität in Simulink verwendet einen MATLAB Function-Block, der einen unterstützten Compiler erfordert. Für die meisten Plattformen wird ein Standard-C-Compiler mit der MATLAB®-Installation mitgeliefert. Wenn Sie die Sprache C++ verwenden, müssen Sie einen kompatiblen C++ Compiler installieren. Um eine Liste der unterstützten Compiler anzuzeigen, öffnen Sie Supported and Compatible Compilers, klicken Sie auf die Registerkarte, die Ihrem Betriebssystem entspricht, suchen Sie die Simulink Product Family-Tabelle und gehen Sie zur Spalte For Model Referencing, Accelerator mode, Rapid Accelerator mode, and MATLAB Function blocks. Wenn Sie mehrere MATLAB-unterstützte Compiler auf Ihrem System installiert haben, können Sie den Standard-Compiler mit dem Befehl mex -setup
ändern. Siehe Change Default Compiler.
Blöcke
Image Classifier | Klassifizierung von Daten mithilfe eines trainierten neuronalen Deep-Learning-Netzes (Seit R2020b) |
Predict | Predict responses using a trained deep learning neural network (Seit R2020b) |
Stateful Classify | Classify data using a trained deep learning recurrent neural network (Seit R2021a) |
Stateful Predict | Predict responses using a trained recurrent neural network (Seit R2021a) |
Deep Learning Object Detector | Detect objects using trained deep learning object detector (Seit R2021b) |
TensorFlow Model Predict | Predict responses using pretrained Python TensorFlow model (Seit R2024a) |
PyTorch Model Predict | Predict responses using pretrained Python PyTorch model (Seit R2024a) |
ONNX Model Predict | Predict responses using pretrained Python ONNX model (Seit R2024a) |
Custom Python Model Predict | Predict responses using pretrained custom Python model (Seit R2024a) |
Themen
Bilder
- Classify Images in Simulink Using GoogLeNet
This example shows how to classify an image in Simulink® using theImage Classifier
block. - Acceleration for Simulink Deep Learning Models
Improve simulation speed with accelerator and rapid accelerator modes. - Lane and Vehicle Detection in Simulink Using Deep Learning
This example shows how to use deep convolutional neural networks inside a Simulink® model to perform lane and vehicle detection. - Classify ECG Signals in Simulink Using Deep Learning
This example shows how to use wavelet transforms and a deep learning network within a Simulink (R) model to classify ECG signals. - Classify Images in Simulink with Imported TensorFlow Network
Import a pretrained TensorFlow™ network usingimportTensorFlowNetwork
, and then use the Predict block for image classification in Simulink.
Sequenzen
- Predict and Update Network State in Simulink
This example shows how to predict responses for a trained recurrent neural network in Simulink® by using theStateful Predict
block. - Classify and Update Network State in Simulink
This example shows how to classify data for a trained recurrent neural network in Simulink® by using theStateful Classify
block. - Speech Command Recognition in Simulink
Detect the presence of speech commands in audio using a Simulink model. - Time Series Prediction in Simulink Using Deep Learning Network
This example shows how to use an LSTM deep learning network inside a Simulink® model to predict the remaining useful life (RUL) of an engine. - Battery State of Charge Workflow
An example workflow for training, compressing, and using a deep learning network in Simulink. - Physical System Modeling Using LSTM Network in Simulink
This example shows how to create a reduced order model (ROM) to replace a Simscape component in a Simulink® model by training a long short-term memory (LSTM) neural network. - Improve Performance of Deep Learning Simulations in Simulink
This example shows how to use code generation to improve the performance of deep learning simulations in Simulink®.
Verstärkungslernen
- Create Simulink Environment and Train Agent
Train a controller using reinforcement learning with a plant modeled in Simulink as the training environment. - Train DDPG Agent for Adaptive Cruise Control
Train a reinforcement learning agent for an adaptive cruise control application. - Train DQN Agent for Lane Keeping Assist Using Parallel Computing
Train a reinforcement learning agent for a lane keeping assist application. - Train DDPG Agent for Path-Following Control
Train a reinforcement learning agent for a lane following application.
Gemeinsame Ausführung mit Python
- Classify Images Using TensorFlow Model Predict Block
Classify images using TensorFlow Model Predict block. - Classify Images Using ONNX Model Predict Block
Classify images using ONNX Model Predict block. - Classify Images Using PyTorch Model Predict Block
Classify images using PyTorch Model Predict block. - Predict Responses Using TensorFlow Model Predict Block
Predict Responses Using TensorFlow Model Predict block. - Predict Responses Using ONNX Model Predict Block
Predict Responses Using ONNX Model Predict block. - Predict Responses Using PyTorch Model Predict Block
Predict Responses Using PyTorch Model Predict block. - Predict Responses Using Custom Python Model in Simulink (Statistics and Machine Learning Toolbox)
This example shows how to use the Custom Python Model Predict (Statistics and Machine Learning Toolbox) block for prediction in Simulink®.
Code-Generierung
- Deep Learning Code-Generierung aus Simulink-Anwendungen
Generieren von C/C++ und GPU-Code für die Bereitstellung auf Desktop- oder eingebetteten Zielen - Export Network to FMU
This example shows how to export a trained network as a Functional Mock-up Unit (FMU). (Seit R2023b)