Model Analysis

Creating an Application Project

  1. Choose File > New > Project... from the menu bar. The New Project window is displayed, on which choose the Ascend App > Samples > AscendCL C++ Samples sample project and click Change to configure the CANN version. See Figure 1.
    Figure 1 Project creation
    • CANN Version: CANN software package version. If the version is not identified or you want to change the version, click Change and select the Ascend-CANN-Toolkit installation path (to the version number or latest level) in the dialog box displayed.
    • Samples: sample project. Select AscendCL C++ Samples.
  2. Click Next. The corresponding code repository on Gitee is displayed. On the Gitee code repository page, choose Clone or Download > Copy to copy the download link of the code package.
  3. Run the git clone URL (URL is the copied download link of the code package) command in the development environment to clone the code package to the development environment.
    git clone https://gitee.com/ascend/samples.git
  4. Import the sample project through MindStudio. (Obtain the application development sample project of the Caffe ResNet-50 network from the cplusplus/level2_simple_inference/1_classification/resnet50_imagenet_classification directory of the sample package.)
    Choose File > Open from the menu bar. The Open File or Project window is displayed, on which select the resnet50_imagenet_classification sample project and click OK, as shown in Figure 2.
    Figure 2 Selecting a sample project
  5. Access the trust configuration window and click Trust Project to trust the project. (You can select Trust projects in <workspace_directory> to trust all projects in the directory.)
    Figure 3 Trust configuration window
  6. After the project is imported, if you cannot find the model directory, right-click the root directory of the project to create it. Figure 4 shows the directory.
    Figure 4 Application project directory

Model Analysis

  1. Choose Ascend > AMIT from the menu bar to start the integrated inference tool.
  2. Access the AMIT process page, and click Model Analyse to enter the parameter configuration page for model analysis. See Figure 5.
    Figure 5 Model analysis
  3. Analyze operators that are not supported by a model.
    Select the ResNet-50 network model file (.prototxt) from Model File and click OK. The model weight file in the same directory is automatically filled, as shown in Figure 6.
    Figure 6 Model configuration information
  4. Click to view the model's original network structure. Operators that are not supported by the current CANN version are marked in red, as shown in Figure 7.
    Figure 7 Model visualization
  5. Click analyse after Unsupported Ops, and information about operators that are not supported by the CANN version is displayed in the output window.

    If no output is generated after model analysis, all operators in the model are supported by the CANN version, allowing conversion and subsequent development tasks to be performed.