v2026.10.0
All Bundles
Bundle

ONNX Runtime inference library for running pre-trained models. Supports object detection (YOLO), image classification (ResNet), segmentation (DeepLab), pose estimation (OpenPose), face recognition, and Phi-3 text generation. Compile with -lib onnx.

ModelInfo

What a model takes in and gives back. Worth reading once before building inputs. The alternative is guessing at names and shapes, and a mismatch is reported by the runtime in terms of the graph rather than of anything the caller wrote.

Example

session := Session->New("model.onnx");
info := session->GetModelInfo();
each(spec in info->GetInputs()) {
  spec->ToString()->PrintLine();
};

Operations

Find #

One input or output by name, whichever side it is on.

method : public : Find(name:String) ~ TensorSpec

Parameters

NameTypeDescription
nameStringthe tensor name

Return

TypeDescription
TensorSpecthe specification, or Nil when the model has no such tensor

GetInputNames #

Input names, for a run that names a subset.

method : public : GetInputNames() ~ String[]

Return

TypeDescription
Stringinput names

GetInputs #

The model's inputs, in the order the graph declares them.

method : public : GetInputs() ~ Vector<TensorSpec>

Return

TypeDescription
Vector<TensorSpec>input specifications

GetOutputNames #

Output names, for a run that asks for a subset.

method : public : GetOutputNames() ~ String[]

Return

TypeDescription
Stringoutput names

GetOutputs #

The model's outputs, in the order the graph declares them.

method : public : GetOutputs() ~ Vector<TensorSpec>

Return

TypeDescription
Vector<TensorSpec>output specifications