6.3. TopsIDEAS onnx opset¶
描述¶
转化onnx模型的opset
命令行¶
使用方法¶
usage: topsideas onnx opset [-h] --input_onnx INPUT_ONNX [--output_onnx OUTPUT_ONNX] [--opset OPSET] [--keep_init_inputs]
参数¶
| short | long | default | help |
|---|---|---|---|
-h |
--help |
show this help message and exit | |
--input_onnx |
None |
Provide the original onnx file. | |
--output_onnx |
None |
Export the modified onnx file. | |
--opset |
13 |
Set opset version. | |
--keep_init_inputs |
If 'keep_init_inputs' is True, it is enabled to keep init inputs when ir_version is greater than 4. |
示例¶
topsideas onnx opset –input_onnx=demo.onnx –opset=13

API¶
使用方法¶
from topsideas.onnx import Opset
result = Opset.run(input_mp, opset)
参数¶
| argument | type | default |
|---|---|---|
| input_mp | onnx.onnx_ml_pb2.ModelProto | |
| opset | int | |
| keep_init_inputs | False | |
| RETURN | onnx.onnx_ml_pb2.ModelProto |