module onnxrt.optim.graph_schema_helper

Short summary

module mlprodict.onnxrt.optim.graph_schema_helper

Functions to help guessing the final graph structure.

source on GitHub

Functions

function

truncated documentation

_guess_type

get_defined_inputs

Retrieves defined inputs in already declared variables bsed on their names.

get_defined_outputs

Gets types of predefined outputs when they cannot be inferred. Some part of it should be automated based on type …

proto2vars

Converts proto values to Variables.

Documentation

Functions to help guessing the final graph structure.

source on GitHub

mlprodict.onnxrt.optim.graph_schema_helper._guess_type(var)
mlprodict.onnxrt.optim.graph_schema_helper.get_defined_inputs(input_names, variables=None, dtype=None)

Retrieves defined inputs in already declared variables bsed on their names.

Parameters
  • input_names – input names

  • variables – registered variables created by previous operators

  • dtype – float computational type

Returns

typed inputs as tuple(name, type)

source on GitHub

mlprodict.onnxrt.optim.graph_schema_helper.get_defined_outputs(outputs, onnx_node, typed_inputs=None, variables=None, dtype=None)

Gets types of predefined outputs when they cannot be inferred. Some part of it should be automated based on type constraints.

Parameters
  • outputs – requested outputs

  • onnx_nodeONNX node definition

  • typed_inputs – known typed inputs of the node as tuple(name, type)

  • variables – registered variables created by previous operators

  • dtype – float computational type

Returns

typed outputs as tuple(name, type)

source on GitHub

mlprodict.onnxrt.optim.graph_schema_helper.proto2vars(values)

Converts proto values to Variables.

source on GitHub