Files
ANSCORE/tests
nghianguyenandClaude Opus 5 8e50120759 feat(ANSModelPackage): ask the model its input size when nothing else says
A package now carries what its model expects on the input, but every
package written before that does not — and neither does the zip, which
is most of what is in the field. The engine was then left to assume
640x640, which is wrong for a classification export at 224 and for
anything trained at a rectangular size.

The model itself always knows. ANSOnnxShape reads the first input's
shape straight out of the ONNX protobuf, from memory or from a file,
walking the top level and SEEKING past the nodes and the initializers
rather than reading them — the fields it wants sit after all of the
weight on the wire, and a 324 MB model answers in ten milliseconds.

OpenModelPackage uses it only when the manifest is silent, which costs
nothing there because the bytes are already decrypted in hand. An axis
the graph leaves open is reported as zero and a file that cannot be
parsed is a failure: both mean "this model does not say", and the caller
keeps the default it had. Being wrong about an input size would be worse
than being silent about it.

Checked against python-onnx on all 46 models on this machine, static and
dynamic, four-dimensional and not, with no disagreements. The test
writes ONNX graphs byte by byte, with node and initializer ahead of the
input as a real export has them, and packs one into a package whose
manifest says nothing — which is the case this exists for. 40 checks,
no failures.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 22:47:47 +10:00
..
2026-03-29 12:51:37 +11:00
2026-05-06 19:55:52 +10:00
2026-04-24 14:48:55 +10:00
2026-06-18 05:55:31 +10:00
2026-05-02 12:24:53 +10:00
2026-03-29 12:51:37 +11:00
2026-06-18 05:55:31 +10:00