Development Workflow
Figure 1 Development workflow
- Set up the development environment and operating environment.
- Create code directories.
Before developing an app, you must create directories to store code files, test images, and model files. The following is an example:
├App name ├── caffe_model # Directory of the configuration file and model file for model conversion │ ├── xxx.cfg │ ├── xxx.prototxt ├── data │ ├── xxx.jpg # Test data │ ├── model │ ├── xxx.om # Model file generated after conversion │ ├── xxx.py # Python script ├── xxx.py
- Develop an app.
- Initialize pyACL. For details, see Initializing pyACL.
Before using the pyACL APIs to develop an app, acl.init must be called to initialize pyACL. Otherwise, errors may occur during the initialization of internal resources, causing service exceptions.
- For details about how to allocate runtime resources, see Runtime Resource Allocation and Deallocation.
- Transfer data by referring to Data Copy.
- Perform model inference by referring to Model Inference.
After model inference is complete, destroy the allocations.
Perform data postprocessing as required. For example, for an image classification app, identify the class indexes with the highest confidence values in data postprocessing.
- After data processing is complete, destroy runtime allocations. For details, see Runtime Resource Allocation and Deallocation.
- Deinitialize pyACL. For details, see Initializing pyACL.
- Initialize pyACL. For details, see Initializing pyACL.
- Run the application, including converting the model and running the application script. For details, see App Debugging.
Parent topic: Model Inference