Scs4onnx Versions Save

A very simple tool that compresses the overall size of the ONNX model by aggregating duplicate constant values as much as possible.

1.0.18

1 year ago
  • Add short form parameter
    $ scs4onnx -h
    
    usage:
      scs4onnx [-h]
      [-m {shrink,npy}]
      [-fo FORCED_EXTRACTION_OP_NAMES]
      [-fc FORCED_EXTRACTION_CONSTANT_NAMES]
      [-d]
      [-n]
      input_onnx_file_path output_onnx_file_path
    
    
    positional arguments:
      input_onnx_file_path
        Input onnx file path.
    
      output_onnx_file_path
        Output onnx file path.
    
    optional arguments:
      -h, --help
        show this help message and exit
    
      -m {shrink,npy}, --mode {shrink,npy}
        Constant Value Compression Mode.
        shrink: Share constant values inside the model as much as possible.
                The model size is slightly larger because
                some shared constant values remain inside the model,
                but performance is maximized.
        npy:    Outputs constant values used repeatedly in the model to an
                external file .npy. Instead of the smallest model body size,
                the file loading overhead is greater.
        Default: shrink
    
      -fo FORCED_EXTRACTION_OP_NAMES [FORCED_EXTRACTION_OP_NAMES ...], --forced_extraction_op_names FORCED_EXTRACTION_OP_NAMES [FORCED_EXTRACTION_OP_NAMES ...]
        Extracts the constant value of the specified OP name to .npy
        regardless of the mode specified.
        Cannot be used with --forced_extraction_constant_names at the same time.
        e.g. --forced_extraction_op_names aaa bbb ccc
    
      -fc FORCED_EXTRACTION_CONSTANT_NAMES [FORCED_EXTRACTION_CONSTANT_NAMES ...], --forced_extraction_constant_names FORCED_EXTRACTION_CONSTANT_NAMES [FORCED_EXTRACTION_CONSTANT_NAMES ...]
        Extracts the constant value of the specified Constant name to .npy
        regardless of the mode specified.
        Cannot be used with --forced_extraction_op_names at the same time.
        e.g. --forced_extraction_constant_names aaa bbb ccc
    
      -d, --disable_auto_downcast
        Disables automatic downcast processing from Float64 to Float32 and INT64
        to INT32. Try enabling it and re-running it if you encounter type-related
        errors.
    
      -n, --non_verbose
        Do not show all information logs. Only error logs are displayed.
    

1.0.17

2 years ago
  • Security update
  • README update

1.0.16

2 years ago
  • Eliminated comma delimiters in input parameters
    • --forced_extraction_op_names
    • --forced_extraction_constant_names

1.0.15

2 years ago
  • Slightly modified README

1.0.14

2 years ago
  • README update

1.0.13

2 years ago
  • Improvement to avoid unnecessary process execution

1.0.12

2 years ago
  • Support for --forced_extraction_constant_names option
  • Add sammple ONNX models

1.0.11

2 years ago
  • Update README
  • Add sample ONNX models

1.0.10

2 years ago
  • Added option to disable automatic downcast processing
    • --disable_auto_downcast Disables automatic downcast processing from Float64 to Float32 and INT64 to INT32. Try enabling it and re-running it if you encounter type-related errors.

1.0.9

2 years ago
  • Added option to auto downcast from Float64 to Float32 and INT64 to INT32 to attempt size compression.
  • Bug fix for --forced_extraction_op_names