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. Initialized. For details, see Initialization and Deinitialization.

      Before using the pyacl API to develop an application, you must call the acl.init API to initialize the application. Otherwise, errors may occur during the initialization of internal system resources, causing exceptions in other services.

    2. Runtime resource application. For details, see Runtime Resource Allocation and Deallocation.
    3. Parameter for data transmission. .
    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. After all data is processed, release runtime resources in a timely manner. For details, see Runtime Resource Allocation and Deallocation.
    6. Perform deinitialization. For details, see Initialization and Deinitialization.
  4. Run the application, including model conversion and application script execution. For details, see App Debugging.