The algorithmic toolchain covers the key steps of model training (floating-point and quantization training, optional), conversion, performance/accuracy validation, deployment and inference. To facilitate your quick experience and learning, rich and comprehensive samples are provided in the OE Development Kit. To facilitate your understanding and use of these samples, this article will provide a detailed introduction to these samples.
First of all, after you obtain the OE development package, the directory structure of the unzipped samples package is shown below:
The samples directory provides model training sample, floating-point to fixed-point model sample, and UCP related sample in the Unify Compute Platform.
Below is a distribution of general processes and samples used at each stage of the toolchain:
The toolchain provides model conversion samples in the samples/ai_toolchain/horizon_model_convert_sample folder, and the sample package directory structure is shown below:
The OE package not only provides PTQ model conversion samples, but additionally contains one-click run scripts for model checking, calibration data preprocessing, conversion compilation, and inference.
Take 03_resnet50 in the horizon_model_convert_sample/03_classification directory as an example of the relevant script:
For a tutorial on how to use the PTQ model conversion sample, please refer to PTQ Model Conversion Samples section.
The toolchain provides sample source code and running scripts for the Unify Compute Platform UCP in the samples/ai_toolchain/ucp_tutorial directory, and the sample package structure is shown below:
deps_aarch64: AArch64 public dependency directory, containing UCP dependency library and header file, etc.
deps_x86: X86 simulation public dependency directory.
dnn: DNN samples, containing as below:
ai_benchmark provides performance and accuracy evaluation samples of common models for embedded application development. For detailed introduction and usage tutorial, please refer to the introduction in the section AI Benchmark User Guide.
basic_samples provides model inference related to the use of shallow and deep samples, designed to help you familiarize and learn the model inference related to the interface and a variety of advanced features, detailed introduction and use of the tutorial, please refer to the introduction in the section Basic Sample User Guide.
tools: The Unify Compute Platform UCP provides tools.