Main Content

Quantization Workflow Prerequisites

This page describes the products required to quantize, simulate, and deploy deep learning networks using Deep Learning Toolbox Model Quantization Library. The prerequisites required depend on your selections at each stage of the quantization workflow.

Prerequisites for All Quantization Workflows

The following requirements apply to all stages of the quantization workflow.

Supported Networks and Layers

The following links describe the networks and layers supported for each execution environment.

Prerequisites for Calibration

The prerequisites for calibration depend on your selection of calibration environment.

  • Calibrate on host GPU (default)

    • Parallel Computing Toolbox™

    • GPU Coder™ Interface for Deep Learning

    • CUDA® enabled NVIDIA® GPU with compute capability 3.2 or higher.

  • Calibrate on host CPU

    • MATLAB® Coder™ Interface for Deep Learning

On Windows®, the MinGW C/C++ compiler is not supported. Use Microsoft Visual C++ 2019, Microsoft Visual C++ 2017, or Microsoft Visual C++ 2015.

On Linux®, use a GCC C/C++ compiler.

For a list of supported compilers, see Supported and Compatible Compilers.

Prerequisites for Quantization

To quantize your network for simulation in MATLAB using the quantize function or the Export > Export Quantized Network option in the Deep Network Quantize app, no additional prerequisites are required.

Prerequisites for Validation

The following are required to validate your quantized network for deployment using the validate function or the Quantize and Validate button in the Deep Network Quantizer app.

Execution EnvironmentPrerequisites for Validation
GPU

FPGA

  • MATLAB Coder Interface for Deep Learning

  • Deep Learning HDL Toolbox™

  • Deep Learning HDL Toolbox Support Package for Xilinx® FPGA and SoC Devices

  • Deep Learning HDL Toolbox Support Package for Intel® FPGA and SoC Devices

  • hdlsetuptoolpath (HDL Coder)

CPU

MATLAB

  • N/A

For the FPGA execution environment, you can choose to validate your quantized network using simulation when you set the Simulate property of dlquantizer to 'on'. This option requires only Deep Learning HDL Toolbox.

For CPU and GPU deployment, the software generates code for a convolutional deep neural network by quantizing the weights, biases, and activations of the convolution layers to 8-bit scaled integer data types. The quantization is performed by providing the calibration result file produced by the calibrate function to the codegen (MATLAB Coder) command.

Code generation does not support quantized deep neural networks produced by the quantize function.

Related Topics