Skip to content
Novus Examples
onnx370 B

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.

Graph preview — 2 operator nodesonnx
nodeoperatorinputsoutputs
matrix_multiplyMatMulX, WXW
add_biasAddXW, BiasY
ONNX opset 18 graph; inputs X; output 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.

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