@@ -72,18 +72,15 @@ $ python
72
72
Help on function extraction in module sne4onnx.onnx_network_extraction:
73
73
74
74
extraction(
75
- input_onnx_file_path: str,
76
75
input_op_names: List[str],
77
76
output_op_names: List[str],
78
- output_onnx_file_path: Union[str, NoneType] = ' ' ,
79
- onnx_graph: Union[onnx.onnx_ml_pb2.ModelProto, NoneType] = None
77
+ input_onnx_file_path: Union[str, NoneType] = ' ' ,
78
+ onnx_graph: Union[onnx.onnx_ml_pb2.ModelProto, NoneType] = None,
79
+ output_onnx_file_path: Union[str, NoneType] = ' '
80
80
) -> onnx.onnx_ml_pb2.ModelProto
81
81
82
82
Parameters
83
83
----------
84
- input_onnx_file_path: str
85
- Input onnx file path.
86
-
87
84
input_op_names: List[str]
88
85
List of OP names to specify for the input layer of the model.
89
86
Specify the name of the OP, separated by commas.
@@ -94,16 +91,21 @@ extraction(
94
91
Specify the name of the OP, separated by commas.
95
92
e.g. [' ddd' ,' eee' ,' fff' ]
96
93
97
- output_onnx_file_path : Optional[str]
98
- Output onnx file path.
99
- If not specified, .onnx is not output .
100
- Default: ' '
94
+ input_onnx_file_path : Optional[str]
95
+ Input onnx file path.
96
+ Either input_onnx_file_path or onnx_graph must be specified .
97
+ onnx_graph If specified, ignore input_onnx_file_path and process onnx_graph.
101
98
102
99
onnx_graph: Optional[onnx.ModelProto]
103
100
onnx.ModelProto.
104
101
Either input_onnx_file_path or onnx_graph must be specified.
105
102
onnx_graph If specified, ignore input_onnx_file_path and process onnx_graph.
106
103
104
+ output_onnx_file_path: Optional[str]
105
+ Output onnx file path.
106
+ If not specified, .onnx is not output.
107
+ Default: ' '
108
+
107
109
Returns
108
110
-------
109
111
extracted_graph: onnx.ModelProto
@@ -125,9 +127,9 @@ $ sne4onnx \
125
127
from sne4onnx import extraction
126
128
127
129
extracted_graph = extraction(
128
- input_onnx_file_path = ' input.onnx' ,
129
130
input_op_names = [' aaa' , ' bbb' , ' ccc' ],
130
131
output_op_names = [' ddd' , ' eee' , ' fff' ],
132
+ input_onnx_file_path = ' input.onnx' ,
131
133
output_onnx_file_path = ' output.onnx' ,
132
134
)
133
135
```
@@ -138,8 +140,8 @@ from sne4onnx import extraction
138
140
extracted_graph = extraction(
139
141
input_op_names = [' aaa' , ' bbb' , ' ccc' ],
140
142
output_op_names = [' ddd' , ' eee' , ' fff' ],
141
- output_onnx_file_path = ' output.onnx' ,
142
143
onnx_graph = graph,
144
+ output_onnx_file_path = ' output.onnx' ,
143
145
)
144
146
```
145
147
0 commit comments