module tools.onnx_micro_runtime

Inheritance diagram of mlprodict.tools.onnx_micro_runtime

Short summary

module mlprodict.tools.onnx_micro_runtime

Micro runtime for ONNX.

Classes

class

truncated documentation

OnnxMicroRuntime

Implements a micro runtime for ONNX graphs. It does not implements all the operator types.

Methods

method

truncated documentation

__init__

_op_add

Runtime for operator Op.Add.

_op_concat

Runtime for operator Op.Concat.

_op_gather

Runtime for operator Op.Gather.

_op_gemm

Runtime for operator Op.Gemm.

_op_identity

Runtime for operator Op.Identity.

_op_matmul

Runtime for operator Op.MatMul.

_op_max

Runtime for operator Op.Max.

_op_mul

Runtime for operator Op.Mul.

_op_reduceprod

Runtime for operator Op.ReduceProd.

_op_reducesum

Runtime for operator Op.ReduceSum.

_op_reshape

Runtime for operator Op.Reshape.

_op_shape

Runtime for operator Op.Shape.

_op_squeeze

Runtime for operator Op.Squeeze.

_op_transpose

Runtime for operator Op.Transpose.

_op_unsqueeze

Runtime for operator Op.Unsqueeze.

run

Computes the outputs of the graph.

Documentation

Micro runtime for ONNX.

New in version 0.6.

source on GitHub

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

source on GitHub

__init__(model_onnx)
_op_add(x, y)

Runtime for operator Op.Add.

_op_concat(*args, axis=None)

Runtime for operator Op.Concat.

_op_gather(x, indices, axis=None)

Runtime for operator Op.Gather.

_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_matmul(x, y)

Runtime for operator Op.MatMul.

_op_max(*inps)

Runtime for operator Op.Max.

_op_mul(x, y)

Runtime for operator Op.Mul.

_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_shape(x)

Runtime for operator Op.Shape.

_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

source on GitHub