module onnx_tools.optim.graph_schema_helper
#
Short summary#
module mlprodict.onnx_tools.optim.graph_schema_helper
Functions to help guessing the final graph structure.
Functions#
function |
truncated documentation |
---|---|
Retrieves defined inputs in already declared variables bsed on their names. |
|
Gets types of predefined outputs when they cannot be inferred. Some part of it should be automated based on type … |
|
Converts proto values to Variables. |
Documentation#
Functions to help guessing the final graph structure.
- mlprodict.onnx_tools.optim.graph_schema_helper._guess_type(var)#
- mlprodict.onnx_tools.optim.graph_schema_helper.get_defined_inputs(input_names, variables=None, dtype=None, schema=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
schema – defined inputs by schema (expected_inputs)
- Returns:
typed inputs as
tuple(name, type)
- mlprodict.onnx_tools.optim.graph_schema_helper.get_defined_outputs(outputs, onnx_node, typed_inputs=None, variables=None, dtype=None, schema=None, schema_inputs=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_node – ONNX 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
schema – defined outputs by schema (expected_outputs)
schema_inputs – defined inputs by schema (expected_inputs)
- Returns:
typed outputs as
tuple(name, type)
- mlprodict.onnx_tools.optim.graph_schema_helper.proto2vars(values)#
Converts proto values to Variables.