Preparing Dump Data of an Offline Model
Procedure
Perform the following operations in MindStudio.
- Create an application project.
- Click New Project on the welcome page or choose on the menu bar. The New Project window is displayed. Set corresponding parameters and click Next. See Figure 1.
- 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 ACL ResNet-50(C++).
- Configure related information and click Finish. See Figure 2.
- Project name: project name, which can be customized.
- Project location: project directory. By default, the project is created in $HOME/MindstudioProjects.
- Click New Project on the welcome page or choose on the menu bar. The New Project window is displayed. Set corresponding parameters and click Next. See Figure 1.
- Use the ATC tool to convert the .pb model prepared in Preparing .npy Data of a TensorFlow Model into an .om model.
- Choose on the menu bar to open the model conversion page, select the .pb file to be converted, and set the output path. Then, click Next.
Figure 3 Model conversion page
- Go to the Data Pre-Processing page to configure data preprocessing and click Next.
- Go to the Advanced Options Preview page to configure advanced options and click Finish to start model conversion.
If the message "Model converted successfully" is displayed, the conversion is successful and the .om file is generated in the specified output directory.

- Choose on the menu bar to open the model conversion page, select the .pb file to be converted, and set the output path. Then, click Next.
- Upload the input test.bin file to the corresponding directory, as shown in Figure 4.
For details about how to prepare the input test.bin file for model inference, see Preparation of the Input .bin File for Model Inference.
- Modify the script and specify the .om model and input file.
Modify the sample_process.cpp file in the src directory as follows.

- Choose Build > Edit Build Configuration... on the menu bar. The build configuration page is displayed.
Click
, retain the default settings, and click OK. - On the menu bar, choose Build > Build CMake Project.
After the build is complete, the main file is generated in the out directory of the current project directory.
Figure 6 Directory of the main file
- Choose on the menu bar. The run configuration page is displayed.
- Choose
> CMake Application to add and configure run parameters of the application project. Figure 5 shows a configuration example. Click OK.Figure 7 Configuration editing page
- Configure dump.
- Choose on the menu bar, select the .om model, and click OK, as shown in the following figure.
Figure 8 .om model selection
- Configure dump as follows.
Figure 9 Configuration page
- Choose on the menu bar, select the .om model, and click OK, as shown in the following figure.
- Click
to run the application project. The generated dump data is stored in the dump directory of the current project.Figure 10 dump directory
Parent topic: Comparison Data Preparation



