Main Content

Workflow for Deep Learning Code Generation withMATLABCoder

WithMATLAB®Coder™, you can generate code for prediction from a pretrained convolutional neural network (CNN), 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 useMATLAB Coderto generate generic C or C++ code for deep learning networks. Such C or C++ code does not depend on any third-party libraries.

  1. Get a trained network by using Deep Learning Toolbox™. Construct and train the network or use a pretrained network. For more information, see:

    The network must be supported for code generation. SeeNetworks and Layers Supported for Code Generation.

  2. Load a network object from the trained network.

    SeeLoad Pretrained Networks for Code Generation.

  3. Generate C++ code for the trained network by usingcodegenor theMATLAB Coderapp. See:

Related Topics