Simple OP Renamer for ONNX.
MIT License
Bot releases are hidden (Show)
Full Changelog: https://github.com/PINTO0309/sor4onnx/compare/1.0.6...1.0.7
Published by PINTO0309 6 months ago
domain
and ir_version
.onnx==1.16.0
Full Changelog: https://github.com/PINTO0309/sor4onnx/compare/1.0.5...1.0.6
Published by PINTO0309 about 2 years ago
search_mode
option -sm {exact_match,partial_match,prefix_match,suffix_match}
--search_mode {exact_match,partial_match,prefix_match,suffix_match}
OP name search mode.
exact_match or partial_match or prefix_match or suffix_match.
exact_match: Exact match search for OP name.
partial_match: Partial match search for OP name.
prefix_match: Prefix match search for OP name.
suffix_match: Suffix match search for OP name.
Default: exact_match
Published by PINTO0309 about 2 years ago
$ sor4onnx -h
usage:
sor4onnx [-h]
-if INPUT_ONNX_FILE_PATH
-on OLD_NEW OLD_NEW
-of OUTPUT_ONNX_FILE_PATH
[-m {full,inputs,outputs}]
[-n]
optional arguments:
-h, --help
show this help message and exit.
-if INPUT_ONNX_FILE_PATH, --input_onnx_file_path INPUT_ONNX_FILE_PATH
Input onnx file path.
-on OLD_NEW OLD_NEW, --old_new OLD_NEW OLD_NEW
All occurrences of substring old replaced by new.
e.g. --old_new "onnx::" ""
-of OUTPUT_ONNX_FILE_PATH, --output_onnx_file_path OUTPUT_ONNX_FILE_PATH
Output onnx file path.
-m {full,inputs,outputs}, --mode {full,inputs,outputs}
Specifies the type of node to be replaced.
full or inputs or outputs.
full: Rename all nodes.
inputs: Rename only the input node.
outputs: Rename only the output node.
Default: full
-n, --non_verbose
Do not show all information logs. Only error logs are displayed.
Published by PINTO0309 about 2 years ago
opname auto supplementation
f'sor_{graph_node.op}_{supplementation_idx}'
Model without opname
Model with auto-completion of opname in sor4onnx
Published by PINTO0309 over 2 years ago
Published by PINTO0309 over 2 years ago
mode
mode: Optional[str]
Specifies the type of node to be replaced.
full or inputs or outputs.
full: Rename all nodes.
inputs: Rename only the input node.
outputs: Rename only the output node.
Default: full
Published by PINTO0309 over 2 years ago