OnnxRuntime (OnnxRuntime v0.1.0-rc.1)

Copy Markdown View Source

Elixir bindings for Microsoft ONNX Runtime.

This module intentionally mirrors the small Ortex facade: load a model with load/3, then run inference with run/2.

Summary

Functions

load(path)

Loads an ONNX model from disk.

execution_providers currently supports [:cpu]. optimization_level maps to ONNX Runtime graph optimization levels:

  • 0 - disabled
  • 1 - basic
  • 2 - extended
  • 3 - all

load(path, execution_providers)

load(path, execution_providers, optimization_level)

run(model, tensors)

Runs a forward pass through a model.

A single input tensor may be passed directly. Multiple inputs should be passed as a tuple in model input order. Outputs are returned as a tuple of Nx.Tensor values backed by OnnxRuntime.Backend.