Development Workflow

Figure 1 Development workflow
  1. Set up the development environment and operating environment.
  2. 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
  3. Develop an app.
    1. Perform initialization. For details, see Initialization and Deinitialization.

      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.

    2. Allocate runtime resources. For details, see Runtime Resource Allocation and Deallocation.
    3. Transfer data by referring to Data Copy.
    4. Perform model inference by referring to Model Management.

      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.

    5. When data processing is complete, destroy runtime allocations. For details, see Runtime Resource Allocation and Deallocation.
    6. Perform deinitialization. For details, see Initialization and Deinitialization.
  4. Run the app, including model conversion and app execution scripts. For details, see App Debugging.