Workflow for Deep Learning Code Generation with MATLAB Coder
With MATLAB® Coder™, you can generate code for prediction from a pretrained neural network, targeting an embedded platform that uses an Intel® processor or an ARM® processor. The generated code calls the Intel MKL-DNN or ARM Compute Library to apply high performance.
You can also use MATLAB Coder to generate generic C or C++ code for deep learning networks. Such C or C++ code does not depend on third-party libraries.
Get a trained network by using Deep Learning Toolbox™. Construct and train the network or use a pretrained network. For more information, see:
Deep Learning in MATLAB (Deep Learning Toolbox).
Pretrained Deep Neural Networks (Deep Learning Toolbox).
The network must be supported for code generation. See Networks and Layers Supported for Code Generation.
Load a network object from the trained network.
Generate C++ code for the trained network by using
codegen
or the MATLAB Coder app. See:
Related Topics
- Deep Learning in MATLAB (Deep Learning Toolbox)
- Learn About Convolutional Neural Networks (Deep Learning Toolbox)
- Prerequisites for Deep Learning with MATLAB Coder
- Code Generation for Deep Learning Networks with MKL-DNN
- Generate Code for a Deep Learning Network for x86-64 Platforms Using Advanced Vector Instructions
- Code Generation for Deep Learning Networks with ARM Compute Library
- Generate Code and Deploy SqueezeNet Network to Raspberry Pi
- Deep Learning Prediction with ARM Compute Using codegen
- Generate Generic C/C++ Code for Deep Learning Networks
- Deep Learning with GPU Coder (GPU Coder)