ONNX Inference Contract - Two-Input Broadcast Add Model
A 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.
| node | operator | inputs | outputs |
|---|---|---|---|
| broadcast_add | Add | X, B | Y |
Specifications
- Opset
- 18
- Ir Version
- 10
- Nodes
- 1
- Inputs
- 2
- Outputs
- 1
- Dynamic Batch
- false
- Model Sha256
- 81eb1e0b4add2f1db5ab8488d47ac4a2e3e939620c834d046762d6b95709e553
Testing contract
Expected to pass- Scenario
- Load the ONNX model with opset 18, bind tensors from two-input-broadcast-input.json, and compare Y with the expected-output sidecar.
- Expected result
- Y must equal [[1.5, 1.0], [3.5, 3.0]] 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 - Two-Input Broadcast 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: 1 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 - Affine MatMul plus Add ModelA 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.

- 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.

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

- jsonONNX Inference Contract - Affine MatMul plus Add InputThe named float32 input tensor payload for the Affine MatMul plus Add model, with explicit shapes and JSON values for runner-independent test setup.

- 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.

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