Skip to content

Commit 57a4937

Browse files
authored
[tools/onnx-subgraph] add guide in README.md for subgraphs verification (#14821)
guide for mse comparing of src model and multi sub models ONE-DCO-1.0-Signed-off-by: Youxin Chen <[email protected]>
1 parent e7c2119 commit 57a4937

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tools/onnx_subgraph/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,18 @@ sub models.
6060
├── NPUsubgraph0.onnx
6161
└── NPUsubgraph1.onnx
6262
```
63+
## Verify the subgraphs inference with original model file
64+
compare the MSE of original inference result and subgraphs inference result
65+
```bash
66+
python scripts/single_vs_multiple_onnx.py \
67+
-s ./resnet-test.onnx \
68+
-m ./subgraphs/ \
69+
-n scripts/subgraphs_ios.txt
70+
```
71+
output:
72+
```bash
73+
Single model inference completed!
74+
Multiple subgraph inference completed!
75+
Comparing inference results between single ONNX model and multiple subgraphs...
76+
Output '316' MSE: 5.125894080395578e-14
77+
```

0 commit comments

Comments
 (0)