ONNX Inference Contract - Affine MatMul plus Add Model
A two-node affine transform with fixed weights and bias, exercising initializers, MatMul dimensions and Add broadcasting. The matching JSON input and expected output make the model immediately usable in a CI inference assertion.
| node | operator | inputs | outputs |
|---|---|---|---|
| matrix_multiply | MatMul | X, W | XW |
| add_bias | Add | XW, Bias | Y |
Specifications
- Opset
- 18
- Ir Version
- 10
- Nodes
- 2
- Inputs
- 1
- Outputs
- 1
- Dynamic Batch
- false
- Model Sha256
- a10c06e45b5892ce20c863c5e0f7ba38481fc0e39de5842c16003a324078793a
Testing contract
Expected to pass- Scenario
- Load the ONNX model with opset 18, bind tensors from affine-matmul-add-input.json, and compare Y with the expected-output sidecar.
- Expected result
- Y must equal [[7.25, 1.0], [3.25, 0.5]] within absolute tolerance 1e-6.
What is a .onnx file?
ONNX (Open Neural Network Exchange) is a portable, protobuf-based graph format for machine-learning models. It records typed inputs and outputs, tensor initializers, operators, attributes, and an opset version so inference runtimes can exchange a model without sharing its training framework.
How to use this file
Load an example .onnx model in an ONNX-compatible runtime, feed it the JSON input from the same fixture group, and compare the resulting tensor with the published expected output. Check names, shapes, dtypes, opset, and tolerance as well as numeric values; each Novus model is validated with the ONNX checker and reference evaluator before publication.
How to use this file for testing
“ONNX Inference Contract - Affine MatMul plus Add Model” is a deterministic Novus Examples fixture for Model inference testing, Model evaluation, Conversion testing. Small, validated ONNX graphs paired with named JSON inputs and expected tensor outputs. Use them to test runtime loading, dtype and shape handling, broadcasting, dynamic batches, reduction behavior, and numeric tolerances without downloading a production-sized model.
Documented properties for this file: 2 nodes. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.
AI/ML fixtures are fully synthetic with documented schemas — no real people or data. Test data loaders, tokenizers, annotation converters, embedding/vector stores, or eval-metric parsers against the known structure and fixed seeds.
Related files
- onnxONNX Inference Contract - Dynamic-Batch ReduceSum ModelA ReduceSum graph with a symbolic batch dimension and fixed feature width, for dynamic-shape import and batch-output tests. The matching JSON input and expected output make the model immediately usable in a CI inference assertion.

- onnxONNX Inference Contract - Static Identity ModelA one-node identity graph with a fixed 1x4 float tensor, useful as the smallest loader and inference smoke test. The matching JSON input and expected output make the model immediately usable in a CI inference assertion.

- onnxONNX Inference Contract - Two-Input Broadcast Add ModelA two-input Add graph where a length-two bias broadcasts across a 2x2 matrix, checking input binding and broadcasting rules. The matching JSON input and expected output make the model immediately usable in a CI inference assertion.

- jsonONNX Inference Contract - Dynamic-Batch ReduceSum Expected OutputThe reference-evaluator output for the Dynamic-Batch ReduceSum model and supplied input, including shape, dtype, exact values and a 1e-6 tolerance.

- jsonONNX Inference Contract - Dynamic-Batch ReduceSum InputThe named float32 input tensor payload for the Dynamic-Batch ReduceSum model, with explicit shapes and JSON values for runner-independent test setup.

- jsonONNX Inference Contract - Static Identity Expected OutputThe reference-evaluator output for the Static Identity model and supplied input, including shape, dtype, exact values and a 1e-6 tolerance.

Generated by generation/p6_core.py. Free for any use, no attribution required — license.