MindSpore Visualization for Comparison
Prerequisites
- You have performed operations in Environment Setup.
- Install tb-graph-ascend.
pip install tb-graph-ascend
- You have performed operations in Accuracy Data Collection.
Performing Comparison
- Create a configuration file for comparison.For example, create a compare.json configuration file in the directory where the training script is located and copy the following content to the file:
1 2 3 4 5
{ "npu_path": "./dump_data_2.7.0", "bench_path": "./dump_data_2.6.0", "is_print_compare_log": true }
The paths specified by npu_path and bench_path must be in the same environment.
- Perform graph building for comparison.
msprobe -f mindspore graph -i ./compare.json -o ./output
After the comparison is complete, a .vis file is generated in ./output.
- Start TensorBoard.
tensorboard --logdir ./output --bind_all
The path specified by --logdir is the ./output path in 2.
After the preceding command is executed, the following log is displayed:
1TensorBoard 2.19.0 at http://ubuntu:6008/ (Press CTRL+C to quit)
Open a browser on Windows and navigate to http://ubuntu:6008/. Replace ubuntu with the server's IP address, for example, http://192.168.1.10:6008/.
If the access is successful, the TensorBoard page is displayed, as shown in the figure below.
Figure 1 MindSpore Visualization for comparison
In this example, level is set to L1 during data dumping. As a result, no model structure data is collected, and no data is available when performing MindSpore Visualization. The data shown in the preceding figure was collected when level was not set to L1.