Deep Learning Code Generation Fundamentals - MATLAB & Simulink (original) (raw)

Functions, objects, and workflows that you can use to generate code for deep learning networks

You can use MATLAB® Coder™ with Deep Learning Toolbox™ to generate C++ code from a trained CNN. You can then deploy the generated code to an embedded platform that uses an Intel® or ARM® processor. You can also generate generic C or C++ code from a trained CNN that does not depend on any third-party libraries.

Functions

codegen Generate C/C++ code fromMATLAB code
coder.loadDeepLearningNetwork Load deep learning network model
coder.DeepLearningConfig Create deep learning code generation configuration objects
coder.DeepLearningCodeConfig Parameters to configure deep learning code generation that does not depend on third-party libraries (Since R2021a)
coder.ARMNEONConfig Parameters to configure deep learning code generation with the ARM Compute Library
coder.CMSISNNConfig Parameters to configure deep learning code generation with the CMSIS-NN library for Cortex-M targets (Since R2022a)
coder.MklDNNConfig Parameters to configure deep learning code generation with the Intel Math Kernel Library for Deep Neural Networks
analyzeNetworkForCodegen Analyze deep learning network for code generation (Since R2022b)
coder.regenerateDeepLearningParameters Regenerate files containing network learnables and states parameters (Since R2021b)

Topics

Generate Digit Images Using Variational Autoencoder on Intel CPUs

Generate Digit Images Using Variational Autoencoder on Intel CPUs

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

Cross Compile Deep Learning Code for ARM Neon Targets

Cross Compile Deep Learning Code for ARM Neon Targets

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

Post-Code-Generation Update of Deep Learning Network Parameters

Post-Code-Generation Update of Deep Learning Network Parameters

Incrementally update the network learnables of a deep learning network application running on edge devices such as Raspberry Pi. This example uses a cart-pole reinforcement learning application to illustrate: