Comparison Procedure

  1. In MindStudio, open the training project in Preparing Dump Data of an Offline Model and choose Ascend > Model Accuracy Analyzer > New Task on the menu bar. The parameter configuration page of Model Accuracy Analyzer is displayed.
  2. Configure comparison parameters. Figure 1 shows the detailed configurations.
    Figure 1 Page for configuring comparison parameters
    Table 1 Configuration parameters

    Parameter

    Description

    Output Path

    Path for storing the comparison result.

    Analysis Mode

    Accuracy comparison and analysis mode. In this sample, select NPU vs GPU/CPU.

    Framework

    In this sample, select TensorFlow.

    NPU Dump

    Directory for storing the dump data file of a model running on the NPU. For details about its directory, see Preparing Dump Data of an Offline Model.

    Model File

    In the inference scenario, select the .om file. For details about its directory, see 2.

    Ground Truth

    Directory for storing the .npy file generated in Preparing .npy Data of a TensorFlow Model.

    Algorithm

    Comparison algorithm dimension. Possible values are:

    • Cosine Similarity (selected by default)
    • Relative Euclidean Distance (selected by default)
    • Absolute Error (selected by default). Corresponding comparison algorithms are as follows:
      • Max Absolute Error
      • Mean Absolute Error
      • Root Mean Square Error
    • Relative Error (selected by default). Corresponding comparison algorithms are as follows:
      • Max Relative Error
      • Mean Relative Error
      • Accumulated Relative Error
    • Kullback Leibler Divergence (not selected by default)
    • Standard Deviation (not selected by default)
  3. Click Start to start the comparison.

    If an error related to Protobuf is reported during comparison, install Protobuf of the corresponding version as prompted.