Before developing an app, you must create directories to store the code files, build scripts, test images, and model files.
The following is an example:
├App name ├── model // Model files │ ├── xxxxxx ├── data │ ├── xxx.jpg // Test data ├── inc // Header files that declare functions │ ├── xxx.h ├── out // Output files ├── src │ ├── xxx.json // Configuration files for system initialization │ ├── CMakeLists.txt // Build scripts │ ├── xxx.cpp // Implementation files
For model inference, the offline model adapted to the Ascend AI Processor (.om file) is mandatory. For details, see Building a Model.
Before using the AscendCL APIs to develop an app, aclInit must be called to initialize AscendCL. Failure to do so may result in errors when internal resources are being initialized, which can then lead to service exceptions.
Perform data postprocessing if required. For example, for an image classification app, you might need to identify the class indexes with the top confidence values.
After model inference is complete, destroy the allocations.