Coverage for mlprodict/onnx_tools/optim/_main_onnx_optim.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

4 statements  

1""" 

2@file 

3@brief Calls all possible :epkg:`ONNX` optimisations. 

4""" 

5from .onnx_optimisation import onnx_remove_node 

6 

7 

8def onnx_optimisations(onnx_model, recursive=True, debug_info=None, **options): 

9 """ 

10 Calls several possible optimisations including 

11 @see fn onnx_remove_node. 

12 

13 @param onnx_model onnx model 

14 @param recursive looks into subgraphs 

15 @param debug_info debug information (private) 

16 @param options additional options 

17 @return new onnx _model 

18 """ 

19 new_model = onnx_remove_node( 

20 onnx_model, recursive=recursive, debug_info=debug_info, 

21 **options) 

22 return new_model