| # ONNX shape_inference wrong-shape drift via duplicate local functions | |
| This repository contains a minimal `.onnx` proof of concept showing that a checker-approved model with duplicate local-function ids can produce a silent wrong output shape contract. | |
| ## Files | |
| - `shape_drift_scan.onnx`: minimal PoC | |
| - `generate_poc.py`: regenerates the PoC | |
| - `reproduce.py`: reproduces the mismatch across `checker`, `shape_inference`, and `ReferenceEvaluator` | |
| ## Reproduction | |
| ```powershell | |
| python generate_poc.py | |
| python reproduce.py | |
| ``` | |
| ## Expected highlights | |
| - `checker ok` | |
| - `shape_inference` reports output shape `[2, 2]` | |
| - runtime produces output shape `[2, 1]` | |