| onnx_run | R Documentation |
Run ONNX model inference
onnx_run(model, inputs)
model |
An |
inputs |
A named list of numeric vectors/matrices.
Names must match the model's input tensor names.
Use |
A named list of output tensors: numeric vectors carrying a
dim attribute when the output has more than one dimension.
The buffers are row-major, as ONNX stores them, so dim is given in
storage order – fastest-varying axis first – which is the reverse of the
shape the ONNX file declares. An output declared [nbox, 4] arrives
as dim = c(4, nbox), one detection per column. This keeps dim
an honest description of the memory, so ordinary R indexing is correct;
use predict.onnx_model to get arrays in the declared ONNX
order instead.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.