.. _f-tf2onnxhelper: module ``onnx_tools.exports.tf2onnx_helper`` ============================================ .. inheritance-diagram:: mlprodict.onnx_tools.exports.tf2onnx_helper Short summary +++++++++++++ module ``mlprodict.onnx_tools.exports.tf2onnx_helper`` Helpers to run examples created with function :func:`export2tf2onnx`. :githublink:`%|py|6` Classes +++++++ +--------------------------------------------------------------------------------------+------------------------------------------+ | class | truncated documentation | +======================================================================================+==========================================+ | :class:`GraphBuilder ` | Helpers to build graph. | +--------------------------------------------------------------------------------------+------------------------------------------+ | :class:`Tf2OnnxConvert ` | Applies the converter on an ONNX graph. | +--------------------------------------------------------------------------------------+------------------------------------------+ | :class:`tf_op ` | Decorator to register any new converter. | +--------------------------------------------------------------------------------------+------------------------------------------+ Functions +++++++++ +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------+ | function | truncated documentation | +=====================================================================================================+=======================================================+ | :func:`get_max_value ` | Returns the maximum value for a specific type. | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------+ | :func:`make_name ` | Creates a unique name. | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------+ | :func:`make_sure ` | Raises an exception if cond is not verified. | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------+ | :func:`make_tf2onnx_code ` | Converts an ONNX operators into :epkg:`tf2onnx` code. | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------+ | :func:`map_onnx_to_numpy_type ` | Converts ONNX type into numpy type. | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------+ Properties ++++++++++ +--------------------------------------------------------------------------------+-------------------------+ | property | truncated documentation | +================================================================================+=========================+ | :meth:`graph ` | Returns the graph. | +--------------------------------------------------------------------------------+-------------------------+ Methods +++++++ +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +===================================================================================================================+========================================================================================================================+ | :py:meth:`__call__ ` | | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_add_node_name ` | Registers an object in in the graph by its name. | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_convert_to_attribute ` | | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_convert_to_input ` | in ONNX, input shold come from node, so it must be a string | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_register_handler ` | | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_dtype ` | Returns the type of one node or None if unknown. | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_node_by_name ` | Retrieves a node by its name. | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`get_shape ` | Returns the type of one node or None if unknown. | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`make_const ` | Make a new constants in the graph. | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`make_model ` | Produces the new ONNX graph with the updated sets of nodes. | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`make_node ` | Adds a node to the list of nodes. | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`make_slice ` | slice changes its schema at opset 10: it treats some attributes as dynamic input so this function has to process ... | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`make_squeeze ` | Squeeze changes its schema at opset 13: it treats axes as a dynamic input kwargs: key could be ["data", "axes"]. ... | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`make_unsqueeze ` | Unsqueeze changes its schema at opset 13: it treats axes as a dynamic input kwargs: key could be ["data", "axes"]. ... | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`remove_node ` | Removes a node name from the list. | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`replace_all_inputs ` | Every taking *old_name* as inputs will take *new_name* instead. Looks in the output as well but in that case, it ... | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :meth:`run ` | Calls the registered converters on the graph held by this instance. Returns the new onnx graph. | +-------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlprodict.onnx_tools.exports.tf2onnx_helper :members: :special-members: __init__ :show-inheritance: