clika_runtime.onnx
Load an ONNX model as a callable in one call.
::
import clika_runtime as crt
model = crt.onnx.load("mlp.onnx", device="cuda:0")
outputs = model(X=crt.tensor(x)) # dict, output name -> Tensor
y = outputs["Y"]
:func:load opens the file, compiles it, and returns a :class:Model:
call it with the inputs by name (or positionally in input_names order)
and read the outputs by name. The editable form stays reachable as
model.onnx (an :class:~clika_runtime.io.OnnxModel) and the compiled
form as model.graph.
| Name | Kind |
|---|---|
Model | class |
| functions | module functions |