.. _f-onnxmanipulations: module ``onnx_tools.onnx_manipulations`` ======================================== .. inheritance-diagram:: mlprodict.onnx_tools.onnx_manipulations Short summary +++++++++++++ module ``mlprodict.onnx_tools.onnx_manipulations`` Implements a class able to compute the predictions from on an :epkg:`ONNX` model. :githublink:`%|py|10` Classes +++++++ +------------------------------------------------------------------------------------+---------------------------------------------------+ | class | truncated documentation | +====================================================================================+===================================================+ | :class:`_inline_mapping ` | Overwrites class dictionary to debug more easily. | +------------------------------------------------------------------------------------+---------------------------------------------------+ Functions +++++++++ +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | function | truncated documentation | +===========================================================================================================================+============================================================================================================================+ | :func:`_change_subgraph_io_type_shape_list ` | | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`_get_new_name ` | | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`_onnx_function_to_model_convert_io ` | | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`_onnx_inline_function_graph ` | | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`_onnx_inline_function_node ` | | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`change_input_type ` | Changes the type of an input. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`change_subgraph_io_type_shape ` | Changes the type of an input or an output of a subgraph. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`enumerate_model_node_outputs ` | Enumerates all the nodes of a model. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`get_hidden_inputs ` | Returns the list of hidden inputs used by subgraphs. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`get_opsets ` | Enumerates all opsets used in a model. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`hash_onnx_object ` | Hashes the content of an object. It uses module :mod:`hashlib`. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`insert_results_into_onnx ` | Inserts results into an ONNX graph to produce an extended ONNX graph. It can be saved and looked into with a tool such ... | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`onnx_function_to_model ` | Converts an ONNX FunctionProto into a ModelProto. The function does not handle attributes yet. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`onnx_inline_function ` | Inlines functions in an ONNX graph. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`onnx_model_to_function ` | Converts an ONNX model into a function. The returned function has no attribute. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`onnx_rename_inputs_outputs ` | Renames input or outputs names. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`onnx_rename_names ` | Renames all names except the inputs and outputs. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`onnx_replace_functions ` | Replaces some of the function in model. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`onnx_subgraphs_level ` | Returns the depth of the graph. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`overwrite_opset ` | Overwrites the main opset in an ONNX file. Does not change any node definition. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :func:`select_model_inputs_outputs ` | Takes a model and changes its outputs. | +---------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ Methods +++++++ +----------------------------------------------------------------------------------------------+-------------------------+ | method | truncated documentation | +==============================================================================================+=========================+ | :py:meth:`__init__ ` | | +----------------------------------------------------------------------------------------------+-------------------------+ | :py:meth:`__setitem__ ` | Adds a value. | +----------------------------------------------------------------------------------------------+-------------------------+ | :meth:`copy ` | Returns a copy. | +----------------------------------------------------------------------------------------------+-------------------------+ | :meth:`remove ` | Removes one element. | +----------------------------------------------------------------------------------------------+-------------------------+ | :meth:`update ` | Updates many values. | +----------------------------------------------------------------------------------------------+-------------------------+ Documentation +++++++++++++ .. automodule:: mlprodict.onnx_tools.onnx_manipulations :members: :special-members: __init__ :show-inheritance: