AMCT Workflow
Figure 3-3 shows the AMCT workflow.
Action |
Description |
---|---|
Package preparation |
Download the tool package. |
Pre-installation actions |
Before AMCT installation, create an installation user, check the system environment, install dependencies, and upload the AMCT package. For details, see Pre-installation Actions. |
Installation |
Install the Caffe version AMCT by referring to AMCT Installation. |
Post-installation actions |
After AMCT installation is complete, merge .proto files and install patch by referring to Post-installation Actions, and then recompile the Caffe environment. To set the log level to be printed during quantization, you also need to set environment variables. |
(Optional) Script creation with AMCT API calls |
If you need to quantize your network model instead of the sample model provided in this instruction, you need to modify the script for adaptation before quantization. For details about how to parse the sample code, see Sample Code. |
Quantization |
Based on the quantization method, quantization is classified into calibration-based quantization and retrain-based quantization. For details, see Calibration-based Quantization and Retrain-based Quantization. Calibration-based quantization can be further classified into uniform quantization and non-uniform quantization according to whether the weight data is compressed. This version supports only uniform quantization. |
(Optional) Model conversion using ATC |
You can convert the quantized deployable model to an offline model supported by the Ascend AI Processor by using ATC, and then perform subsequent inference. |