Preparing Model Files and Data

Add model files and image datasets for inference based on the actual application scenario.

  1. Convert your model.

    Before adding a model file, convert the model trained in a third-party framework to an offline model adapted to the Ascend AI Processor (.om). For details, see Model Conversion.

  2. Add one or more model files.

    Upload the prepared model OM file to the created project.

  3. (Optional) To use the dump function, prepare as follows:
    1. Prepare the xxx.json configuration file (for example, acl.json).

      For details, see Preparing Dump Data of an Offline Model.

    2. Select either of the following methods to use the configuration file as an argument to complete the dump configuration:
      • Use the configuration file as an argument in the aclInit (acl.init) interface.
      • Call the aclmdlSetDump (acl.mdl.set_dump) interface after the aclInit (acl.init) interface and before the model loading interface.

      For details, see the Application Software Development Guide (C&C++) or Application Software Development Guide (Python).

    Currently, only local dump configuration is supported. If remote dump is required, you need to configure acl.json.

  4. Prepare inference data.

    Prepare the data required for inference and upload the data to the application project directory.