module onnx_tools.optim.onnx_optimisation_unused#

Short summary#

module mlprodict.onnx_tools.optim.onnx_optimisation_unused

Optimisation of ONNX graphs.

source on GitHub

Functions#

function

truncated documentation

_process_node

onnx_remove_node_unused

Removes unused nodes of the graph. An unused node is not involved in the output computation.

Documentation#

Optimisation of ONNX graphs.

source on GitHub

mlprodict.onnx_tools.optim.onnx_optimisation_unused._process_node(node, data, edges, paths, prefix='', sep='::', path=None)#
mlprodict.onnx_tools.optim.onnx_optimisation_unused.onnx_remove_node_unused(onnx_model, recursive=True, debug_info=None, **options)#

Removes unused nodes of the graph. An unused node is not involved in the output computation.

Parameters:
  • onnx_model – onnx model

  • recursive – looks into subgraphs

  • debug_info – debug information (private)

  • options – unused

Returns:

new onnx _model

source on GitHub