Skip to content

[tools/onnx-subgraph] add guide in README.md for subgraphs verification #14821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 12, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions tools/onnx_subgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,15 @@ sub models.
└── NPUsubgraph1.onnx
```
## Verify the subgraphs inference with original model file
compare the MSE of original inference result and subgraphs inference result
compare the MSE of original inference result and subgraphs inference result
```bash
python scripts/single_vs_multiple_onnx.py \
-s ./resnet-test.onnx \
-m ./subgraphs/ \
-n scripts/subgraphs_ios.txt
```
output:
```bash
Single model inference completed!
Multiple subgraph inference completed!
Comparing inference results between single ONNX model and multiple subgraphs...
Output '316' MSE: 5.125894080395578e-14
```
output:
Single model inference completed!
Multiple subgraph inference completed!
Comparing inference results between single ONNX model and multiple subgraphs...
Output '316' MSE: 5.125894080395578e-14