Dump Data Comparison
- Start the PrecisionTool interactive command line.
python3 ./precision_tool/cli.py
- Go to the interactive command line interface. (To exit, press Ctrl+C.)
PrecisionTool >
- Run the vc -lt [left_path] -rt [right_path] -g [graph] command to compare the data of the entire network.
vc -lt precision_data/npu/debug_1/dump/20211016164504/1/ge_default_20211016164504_1/1/0 -rt precision_data/npu/debug_0/dump/20211016180613/1/ge_default_20211016180613_1/1/0
The accuracy comparison result is generated in the out_dir directory. You can analyze the data by referring to "Network Accuracy Comparison Result File" in TensorFlow 1.15 Model Porting Guide. Open the CSV file in the directory and search for the first operator whose cosine similarity is less than 0.98 from top to bottom.
- For the preceding result, you can also run the ni (-n) [op_name] -g [graph] -a [attr] -s [save sub graph deep] command of precision_tool to perform single-layer data comparison and analysis. For details, see "precision_tool Command Reference" in TensorFlow 1.15 Model Porting Guide.
- If both debug_0 and debug_1 exist in the precision_data/npu/ directory, the ni command parses the dump files with the same operator name in the two folders. The data differences can be clearly seen from the parsing result.

Op indicates the operator type. As shown in the preceding figure, the operator name is trans_Cast_4940.
Parent topic: NPU vs. NPU Network