| onnx_load | R Documentation |
Parses an .onnx file, builds a ggml computation graph, and allocates tensors on the specified device. Weights are loaded via memory-mapped file (zero-copy where possible).
onnx_load(
path,
device = NULL,
input_shapes = NULL,
n_threads = NULL,
dtype = "f32"
)
path |
Path to .onnx file. |
device |
Backend device: |
input_shapes |
Optional named list of integer vectors specifying
fixed shapes for inputs with dynamic dimensions. Names must match
input tensor names. Each shape must include all dimensions including
batch, e.g. |
n_threads |
Number of CPU threads. |
dtype |
Weight precision: |
An opaque model object (external pointer) for use with
onnx_run(), onnx_summary(), and onnx_inputs().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.