Main Content

Generate MATLAB Code from Deep Network Designer

The Deep Network Designer app enables you to generate MATLAB® code that recreates the network architecture.

  • To recreate the layers in your network, including any initial parameters, select Export > Generate Network Code With Parameters. The app creates a live script and a MAT-file containing the initial parameters (weights and biases) from your network. Run the script to recreate the network layers, including the learnable parameters from the MAT-file. Use this option to preserve the weights if you want to perform transfer learning.

  • To recreate just the layers in your network, select Export > Generate Network Code Without Parameters. This network does not contain initial parameters, such as pretrained weights.

Running the generated script returns the network architecture as a dlnetwork object. For an example of training a network exported from Deep Network Designer, see Get Started with Deep Network Designer.

This image shows an example live script generated using Deep Network Designer.

Example live script generated using Deep Network Designer

See Also

| | |

Related Topics