module tools.onnx_micro_runtime
¶
Short summary¶
module mlprodict.tools.onnx_micro_runtime
Micro runtime for ONNX.
Classes¶
class |
truncated documentation |
---|---|
Implements a micro runtime for ONNX graphs. It does not implements all the operator types. |
Methods¶
method |
truncated documentation |
---|---|
Runtime for operator Op.Add. |
|
Runtime for operator Op.Concat. |
|
Runtime for operator Op.Gather. |
|
Runtime for operator Op.Gemm. |
|
Runtime for operator Op.Identity. |
|
Runtime for operator Op.MatMul. |
|
Runtime for operator Op.Max. |
|
Runtime for operator Op.Mul. |
|
Runtime for operator Op.ReduceProd. |
|
Runtime for operator Op.ReduceSum. |
|
Runtime for operator Op.Reshape. |
|
Runtime for operator Op.Shape. |
|
Runtime for operator Op.Squeeze. |
|
Runtime for operator Op.Transpose. |
|
Runtime for operator Op.Unsqueeze. |
|
Computes the outputs of the graph. |
Documentation¶
Micro runtime for ONNX.
New in version 0.6.
- class mlprodict.tools.onnx_micro_runtime.OnnxMicroRuntime(model_onnx)¶
Bases:
object
Implements a micro runtime for ONNX graphs. It does not implements all the operator types.
- Parameters
model_onnx – ONNX model
- __init__(model_onnx)¶
- _op_gemm(a, b, c=None, alpha=None, beta=None, transA=False, transB=False)¶
Runtime for operator Op.Gemm.
- _op_identity(x)¶
Runtime for operator Op.Identity.
- _op_reduceprod(data, axes=None, keepdims=None)¶
Runtime for operator Op.ReduceProd.
- _op_reducesum(data, axes, keepdims=None, noop_with_empty_axes=None)¶
Runtime for operator Op.ReduceSum.
- _op_reshape(x, shape)¶
Runtime for operator Op.Reshape.
- _op_squeeze(x, axes=None)¶
Runtime for operator Op.Squeeze.
- _op_transpose(x, perm=None)¶
Runtime for operator Op.Transpose.
- _op_unsqueeze(x, axes=None)¶
Runtime for operator Op.Unsqueeze.
- run(inputs)¶
Computes the outputs of the graph.
- Parameters
inputs – dictionary
- Returns
all intermediates results and output as a dictionary