Skip to content

Commit 0e63f63

Browse files
committed
Add short form parameter
1 parent 0662133 commit 0e63f63

File tree

3 files changed

+24
-19
lines changed

3 files changed

+24
-19
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,32 +34,32 @@ $ sne4onnx -h
3434

3535
usage:
3636
sne4onnx [-h]
37-
--input_onnx_file_path INPUT_ONNX_FILE_PATH
38-
--input_op_names INPUT_OP_NAMES
39-
--output_op_names OUTPUT_OP_NAMES
40-
[--output_onnx_file_path OUTPUT_ONNX_FILE_PATH]
41-
[--non_verbose]
37+
-if INPUT_ONNX_FILE_PATH
38+
-ion INPUT_OP_NAMES
39+
-oon OUTPUT_OP_NAMES
40+
[-of OUTPUT_ONNX_FILE_PATH]
41+
[-n]
4242

4343
optional arguments:
4444
-h, --help
45-
show this help message and exit.
45+
show this help message and exit
4646

47-
--input_onnx_file_path INPUT_ONNX_FILE_PATH
48-
Input onnx file path.
47+
-if INPUT_ONNX_FILE_PATH, --input_onnx_file_path INPUT_ONNX_FILE_PATH
48+
Input onnx file path.
4949

50-
--input_op_names INPUT_OP_NAMES
51-
List of OP names to specify for the input layer of the model.
52-
e.g. --input_op_names aaa bbb ccc
50+
-ion INPUT_OP_NAMES [INPUT_OP_NAMES ...], --input_op_names INPUT_OP_NAMES [INPUT_OP_NAMES ...]
51+
List of OP names to specify for the input layer of the model.
52+
e.g. --input_op_names aaa bbb ccc
5353

54-
--output_op_names OUTPUT_OP_NAMES
55-
List of OP names to specify for the output layer of the model.
56-
e.g. --output_op_names ddd eee fff
54+
-oon OUTPUT_OP_NAMES [OUTPUT_OP_NAMES ...], --output_op_names OUTPUT_OP_NAMES [OUTPUT_OP_NAMES ...]
55+
List of OP names to specify for the output layer of the model.
56+
e.g. --output_op_names ddd eee fff
5757

58-
--output_onnx_file_path OUTPUT_ONNX_FILE_PATH
59-
Output onnx file path. If not specified, extracted.onnx is output.
58+
-of OUTPUT_ONNX_FILE_PATH, --output_onnx_file_path OUTPUT_ONNX_FILE_PATH
59+
Output onnx file path. If not specified, extracted.onnx is output.
6060

61-
--non_verbose
62-
Do not show all information logs. Only error logs are displayed.
61+
-n, --non_verbose
62+
Do not show all information logs. Only error logs are displayed.
6363
```
6464

6565
## 3. In-script Usage

sne4onnx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from sne4onnx.onnx_network_extraction import extraction, main
22

3-
__version__ = '1.0.9'
3+
__version__ = '1.0.10'

sne4onnx/onnx_network_extraction.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,14 @@ def extraction(
165165
def main():
166166
parser = ArgumentParser()
167167
parser.add_argument(
168+
'-if',
168169
'--input_onnx_file_path',
169170
type=str,
170171
required=True,
171172
help='Input onnx file path.'
172173
)
173174
parser.add_argument(
175+
'-ion',
174176
'--input_op_names',
175177
type=str,
176178
nargs='+',
@@ -180,6 +182,7 @@ def main():
180182
e.g. --input_op_names aaa bbb ccc"
181183
)
182184
parser.add_argument(
185+
'-oon',
183186
'--output_op_names',
184187
type=str,
185188
nargs='+',
@@ -189,12 +192,14 @@ def main():
189192
e.g. --output_op_names ddd eee fff"
190193
)
191194
parser.add_argument(
195+
'-of',
192196
'--output_onnx_file_path',
193197
type=str,
194198
default='extracted.onnx',
195199
help='Output onnx file path. If not specified, extracted.onnx is output.'
196200
)
197201
parser.add_argument(
202+
'-n',
198203
'--non_verbose',
199204
action='store_true',
200205
help='Do not show all information logs. Only error logs are displayed.'

0 commit comments

Comments
 (0)