From 2c28938c57d6201bda7995a21d202315d2a326ce Mon Sep 17 00:00:00 2001 From: pinto0309 Date: Fri, 9 Sep 2022 15:42:12 +0900 Subject: [PATCH] Add short form --- README.md | 18 +++++++++--------- sbi4onnx/__init__.py | 2 +- sbi4onnx/onnx_batchsize_initialize.py | 4 ++++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 547d4d3..33e6487 100644 --- a/README.md +++ b/README.md @@ -32,31 +32,31 @@ $ pip install -U onnx \ https://github.com/PINTO0309/simple-onnx-processing-tools#docker ## 2. CLI Usage -```bash +``` $ sbi4onnx -h usage: sbi4onnx [-h] - --input_onnx_file_path INPUT_ONNX_FILE_PATH - --output_onnx_file_path OUTPUT_ONNX_FILE_PATH - --initialization_character_string INITIALIZATION_CHARACTER_STRING - [--non_verbose] + -if INPUT_ONNX_FILE_PATH + -of OUTPUT_ONNX_FILE_PATH + -ics INITIALIZATION_CHARACTER_STRING + [-n] optional arguments: -h, --help show this help message and exit. - --input_onnx_file_path INPUT_ONNX_FILE_PATH + -if INPUT_ONNX_FILE_PATH, --input_onnx_file_path INPUT_ONNX_FILE_PATH Input onnx file path. - --output_onnx_file_path OUTPUT_ONNX_FILE_PATH + -of OUTPUT_ONNX_FILE_PATH, --output_onnx_file_path OUTPUT_ONNX_FILE_PATH Output onnx file path. - --initialization_character_string INITIALIZATION_CHARACTER_STRING + -ics INITIALIZATION_CHARACTER_STRING, --initialization_character_string INITIALIZATION_CHARACTER_STRING String to initialize batch size. "-1" or "N" or "xxx", etc... Default: '-1' - --non_verbose + -n, --non_verbose Do not show all information logs. Only error logs are displayed. ``` diff --git a/sbi4onnx/__init__.py b/sbi4onnx/__init__.py index 8d387b7..b3b4da3 100644 --- a/sbi4onnx/__init__.py +++ b/sbi4onnx/__init__.py @@ -1,3 +1,3 @@ from sbi4onnx.onnx_batchsize_initialize import initialize, main -__version__ = '1.0.3' +__version__ = '1.0.4' diff --git a/sbi4onnx/onnx_batchsize_initialize.py b/sbi4onnx/onnx_batchsize_initialize.py index 8353995..b56f477 100644 --- a/sbi4onnx/onnx_batchsize_initialize.py +++ b/sbi4onnx/onnx_batchsize_initialize.py @@ -146,18 +146,21 @@ def initialize( def main(): parser = ArgumentParser() parser.add_argument( + '-if', '--input_onnx_file_path', type=str, required=True, help='Input onnx file path.' ) parser.add_argument( + '-of', '--output_onnx_file_path', type=str, required=True, help='Output onnx file path.' ) parser.add_argument( + '-ics', '--initialization_character_string', type=str, required=True, @@ -167,6 +170,7 @@ def main(): 'Default: \'-1\'' ) parser.add_argument( + '-n', '--non_verbose', action='store_true', help='Do not show all information logs. Only error logs are displayed.'